summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authordavor <vorgrimmlerdavid@gmx.de>2012-09-11 12:31:02 +0200
committerdavor <vorgrimmlerdavid@gmx.de>2012-09-11 12:31:02 +0200
commit43fa88e989ab0b846a91f49b381895c983fe95c2 (patch)
treee5bd9bdb1aa4a53e440a757ba6f675720fac8098 /bin
parent781e7f714130dcd054d5d437f9c9f95c02cf9f7f (diff)
Added silent mode.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/opentox-client-install22
1 files changed, 17 insertions, 5 deletions
diff --git a/bin/opentox-client-install b/bin/opentox-client-install
index 61e2edf..17e20f2 100755
--- a/bin/opentox-client-install
+++ b/bin/opentox-client-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`
@@ -40,7 +50,9 @@ install_ruby
echo
install_with_bundler
-notify
+if [ $SILENT = false ]; then
+ notify
+fi
# return to wd
cd "$DIR"