From 29086d9359635eca24d61bfb167dea675cc5a771 Mon Sep 17 00:00:00 2001 From: Sérgio Almeida Date: Wed, 17 Jun 2009 19:24:03 +0100 Subject: install.sh now verifies if you are root --- install.sh | 18 +++++++++++------- 1 file 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 -- cgit v1.2.3-65-gdbad