summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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