summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrautenberg <rautenberg@in-silico.ch>2012-09-07 16:21:58 +0200
committerrautenberg <rautenberg@in-silico.ch>2012-09-07 16:21:58 +0200
commitbcfeea525d38a7266d3abfa507d0de6dfcd31336 (patch)
treefa0fd1a9862acd3bc191a4037bc59b995df51ee1
parent8b56fa22224cf149c5644f80fea588f5696c9380 (diff)
add silent parameter
-rwxr-xr-xinstall13
1 files changed, 11 insertions, 2 deletions
diff --git a/install b/install
index 66dc4e2..49204ff 100755
--- a/install
+++ b/install
@@ -5,10 +5,19 @@
[ "`id -u`" = "0" ] && echo "This script must not be run as root" 1>&2 && exit 1
+SILENT=false
+if [ -n "$1" ]
+then
+ if [ "$1" = "silent" ]
+ then
+ SILENT=true
+ fi
+fi
+
echo
echo "OpenTox Ruby"
echo "Hit <Return> If all services are stoppped, else hit <Ctrl+C>."
-read delete_me
+[ $SILENT = false ] && read delete_me
echo "Note: CONFIG (~/.opentox) will be backupped."
mkdir -p $OT_PREFIX/tmp/ >/dev/null 2>&1
@@ -30,7 +39,7 @@ check_log `basename $0`
echo
echo "Welcome to base installation for OpenTox compatible services on Ruby and Debian."
echo "IMPORTANT: Hit <Ctrl+C> to adjust config.sh first (<Return> to continue)."
-read delete_me
+[ $SILENT = false ] && read delete_me
echo
echo -n "We need to do some privileged action. "
sudo echo -n ""