summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authordavor <vorgrimmlerdavid@gmx.de>2012-09-11 12:33:41 +0200
committerdavor <vorgrimmlerdavid@gmx.de>2012-09-11 12:33:41 +0200
commit0ced7a54014fe67351d2583802e6d93b873aa24c (patch)
treeb4192843f0d3b4cacdad7f7b634b713f9ef0537e /bin
parent24e34e3413a13a119a891e138705852a2624e80d (diff)
Added silent mode.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/opentox-test-install20
1 files changed, 16 insertions, 4 deletions
diff --git a/bin/opentox-test-install b/bin/opentox-test-install
index 3b1cf33..dfa8eb4 100755
--- a/bin/opentox-test-install
+++ b/bin/opentox-test-install
@@ -6,10 +6,20 @@
SELF=$(basename $0 -install)
[ "`id -u`" = "0" ] && echo "This script must be run as non-root." 1>&2 && exit 1
-echo
-echo "Welcome to service installation (<Return> to continue)."
-read delete_me
+SILENT=false
+if [ -n "$1" ]
+then
+ if [ "$1" = "silent" ]
+ then
+ SILENT=true
+ fi
+fi
+if [ $SILENT = false ]; then
+ echo
+ echo "Welcome to service installation (<Return> to continue)."
+ read delete_me
+fi
# check wd is root of service
DIR=`pwd`
@@ -47,7 +57,9 @@ install_with_bundler
# config
[ -f $OT_CONFIG_DIR/config/test.rb ] || cp $OT_DEFAULT_CONF "$OT_CONFIG_DIR/config/test.rb"
-notify
+if [ $SILENT = false ]; then
+ notify
+fi
# return to wd
cd "$DIR"