From 415f0d6e391a581f1eb8e6607e83e1f5f768213f Mon Sep 17 00:00:00 2001 From: Jeff Becker Date: Wed, 9 Mar 2016 10:59:22 -0500 Subject: [PATCH] update install.sh to have build options passed into build.sh --- install.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/install.sh b/install.sh index 830e730..3ad9ea4 100755 --- a/install.sh +++ b/install.sh @@ -4,7 +4,7 @@ root=$(readlink -e $(dirname $0)) prefix="/opt/nntpchan" -help_text="usage: $0 [--prefix /opt/nntpchan]" +help_text="usage: $0 [--prefix /opt/nntpchan] [-q|--quiet] [-r|--rebuild] [--disable-redis]" # check for help flags first for arg in $@ ; do @@ -19,7 +19,9 @@ done _next="" want_rebuild="0" want_quiet="0" -# check for build flags +build_args="" + +# check for main flags for arg in $@ ; do case $arg in -q|--quiet) @@ -34,6 +36,9 @@ for arg in $@ ; do --prefix=*) prefix=$(echo $arg | cut -d'=' -f2) ;; + --disable-redis) + build_args="$build_args --disable-redis" + ;; *) if [ "X$_next" == "Xprefix" ] ; then # set prefix @@ -54,13 +59,13 @@ _cmd() { if [ "X$want_rebuild" == "X1" ] ; then _cmd echo "rebuilding daemon"; - _cmd $root/build.sh + _cmd $root/build.sh $build_args fi if [ ! -e $root/srndv2 ] ; then _cmd echo "building daemon" # TODO: use different GOPATH for root? - _cmd $root/build.sh + _cmd $root/build.sh $build_args fi