summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSérgio Almeida <mephx.x@gmail.com>2009-06-17 19:24:03 +0100
committerSérgio Almeida <mephx.x@gmail.com>2009-06-17 19:24:03 +0100
commit29086d9359635eca24d61bfb167dea675cc5a771 (patch)
tree647b1d1cb287764e0aaca4a531bb67a11aa8ca90
parentInitial Universal Select Tool Commit (diff)
downloaduselect-29086d9359635eca24d61bfb167dea675cc5a771.tar.gz
uselect-29086d9359635eca24d61bfb167dea675cc5a771.tar.bz2
uselect-29086d9359635eca24d61bfb167dea675cc5a771.zip
install.sh now verifies if you are root
-rw-r--r--install.sh18
1 files changed, 11 insertions, 7 deletions
diff --git a/install.sh b/install.sh
index 326f761..b21082c 100644
--- a/install.sh
+++ b/install.sh
@@ -1,11 +1,15 @@
#!/bin/bash
#
-# Uselect Temporary installer
-#
+# Uselect Temporary Installer
+#
-PWD=`pwd`
+if [ "$(id -u)" != "0" ]; then
+ echo "uselect's $0 must be run as root!"
+ exit 1
+fi
-rm -f /usr/bin/uselect
-rm -f /usr/share/uselect
-ln -s $PWD/uselect.py /usr/bin/uselect
-ln -s $PWD /usr/share/uselect
+rm -rf /usr/bin/uselect
+rm -rf /usr/share/uselect
+mkdir /usr/share/uselect
+cp -R * /usr/share/uselect/
+ln -s /usr/share/uselect/uselect.py /usr/bin/uselect