This repository has been archived on 2023-08-12. You can view files and clone it. You cannot open issues or pull requests or push a commit.
2015-10-21 10:48:14 -04:00
|
|
|
#!/usr/bin/env bash
|
2015-10-21 10:45:49 -04:00
|
|
|
set -e
|
|
|
|
|
root=$(readlink -e $(dirname $0))
|
2016-03-09 08:36:44 -05:00
|
|
|
|
|
|
|
|
tags=""
|
|
|
|
|
|
|
|
|
|
help_text="usage: $0 [--disable-redis]"
|
|
|
|
|
|
|
|
|
|
# check for help flags first
|
|
|
|
|
for arg in $@ ; do
|
|
|
|
|
case $arg in
|
|
|
|
|
-h|--help)
|
|
|
|
|
echo $help_text
|
|
|
|
|
exit 0
|
|
|
|
|
;;
|
|
|
|
|
esac
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
# check for build flags
|
|
|
|
|
for arg in $@ ; do
|
|
|
|
|
case $arg in
|
|
|
|
|
"--disable-redis")
|
|
|
|
|
tags="$tags -tags disable_redis"
|
|
|
|
|
;;
|
|
|
|
|
esac
|
|
|
|
|
done
|
|
|
|
|
|
2015-10-21 10:45:49 -04:00
|
|
|
cd $root
|
|
|
|
|
export GOPATH=$root/go
|
|
|
|
|
mkdir -p $GOPATH
|
2016-03-09 08:36:44 -05:00
|
|
|
go get -v -u $tags github.com/majestrate/srndv2
|
2015-10-21 10:49:08 -04:00
|
|
|
cp -a $GOPATH/bin/srndv2 $root
|
2016-03-09 08:36:44 -05:00
|
|
|
echo "Built"
|