Archived
1
0

use gx for package management

This commit is contained in:
Jeff Becker 2016-04-18 08:40:01 -04:00
parent 8d83e4dbaf
commit 8ac1c210f2
No known key found for this signature in database
GPG Key ID: AB950234D6EA286B
3 changed files with 31 additions and 4 deletions

View File

@ -16,18 +16,39 @@ for arg in $@ ; do
esac
done
rev="QmSLsdX9BQ1f9sBeuMeLnrmFEWQiNJG9nRmgi4Pua2Ui3y"
_next=""
# check for build flags
for arg in $@ ; do
case $arg in
"--disable-redis")
tags="$tags -tags disable_redis"
;;
"--revision")
_next="rev"
;;
"--revision=*")
rev=$(echo $arg | cut -d'=' -f2)
;;
*)
if [ "x$_next" == "xrev" ] ; then
rev="$arg"
fi
esac
done
if [ "x$rev" == "x" ] ; then
echo "revision not specified"
exit 1
fi
cd $root
export GOPATH=$root/go
mkdir -p $GOPATH
go get -v -u $tags github.com/majestrate/srndv2
cp -a $GOPATH/bin/srndv2 $root
echo "obtaining gx"
go get -v github.com/whyrusleeping/gx-go
gx install --global
go get -v gx/ipfs/$rev/srndv2
cp $GOPATH/bin/srndv2 $root
echo "Built"

View File

@ -3,9 +3,15 @@
"author": "jeff",
"version": "0.0.0",
"gxDependencies": [
{
"author": "jeff",
"name": "srndv2",
"hash": "QmSLsdX9BQ1f9sBeuMeLnrmFEWQiNJG9nRmgi4Pua2Ui3y",
"version": "0.0.0"
}
],
"language": "go",
"issues_url": "https://github.com/majestrate/nntpchan",
"gx_version": "0.4.0",
"gx": {}
}
}

View File

@ -2,7 +2,7 @@ package main
import (
"fmt"
"github.com/majestrate/srndv2/src/srnd"
"gx/ipfs/QmSLsdX9BQ1f9sBeuMeLnrmFEWQiNJG9nRmgi4Pua2Ui3y/srndv2/src/srnd"
"log"
"os"
"os/signal"