aboutsummaryrefslogtreecommitdiff
path: root/installer/install.sh
diff options
context:
space:
mode:
authorJoshua Rahm <joshua.rahm@colorado.edu>2015-01-27 18:40:32 -0700
committerJoshua Rahm <joshua.rahm@colorado.edu>2015-01-27 18:40:32 -0700
commit5f3fb9afece2125cbeba79d61a8d88460b7878d7 (patch)
treeb0e1e60bae9927a9449561bf7fe9431a54d12be9 /installer/install.sh
downloadLegacyQBar-5f3fb9afece2125cbeba79d61a8d88460b7878d7.tar.gz
LegacyQBar-5f3fb9afece2125cbeba79d61a8d88460b7878d7.tar.bz2
LegacyQBar-5f3fb9afece2125cbeba79d61a8d88460b7878d7.zip
initial commit
Diffstat (limited to 'installer/install.sh')
-rwxr-xr-xinstaller/install.sh36
1 files changed, 36 insertions, 0 deletions
diff --git a/installer/install.sh b/installer/install.sh
new file mode 100755
index 0000000..c0c47e3
--- /dev/null
+++ b/installer/install.sh
@@ -0,0 +1,36 @@
+#!/bin/bash
+
+if [ `whoami` != root ] ; then
+ echo "Woah! Not so fast, need to be root!"
+ exit 1
+fi
+
+if [ -d /usr/lib/qbar ] ; then
+ echo "Wait, qbar is already installed, or at least the directory is still there (/usr/lib/qbar)"
+
+ echo "Would you like to reinstall it? [Y/n]"
+ read input
+
+ while [[ ($input != Y && $input != n) ]] ; do
+ echo "Y or n"
+ read input
+ done
+
+ if [ $input == n ] ; then
+ exit 0
+ else
+ rm -rv /usr/lib/qbar
+ rm -v /usr/bin/qbar
+ fi
+fi
+
+tar -xzvf qbar_package.tgz
+mv -v qbar/ /usr/lib/
+
+# ---------- Time to install the binary into the right directory ------------
+cd /usr/bin
+
+# need to sym-link to qbar, then we should be good.
+ln -sv /usr/lib/qbar/qbar.sh qbar
+chmod +x qbar
+