summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolás Reynolds <apoyosis@correo.inta.gob.ar>2011-06-02 13:08:36 -0300
committerNicolás Reynolds <apoyosis@correo.inta.gob.ar>2011-06-02 13:08:36 -0300
commit9127f25aff12902bf58302982c104704a5bdf202 (patch)
tree7cd485547b8f50f681fc1edf846e311e79ecfca0
parent7e528534a2f7ff687cedac6b34c3881d97be0716 (diff)
Better root user check
-rwxr-xr-xlibremakepkg2
-rwxr-xr-xlibrestage2
2 files changed, 2 insertions, 2 deletions
diff --git a/libremakepkg b/libremakepkg
index 8af1581..e46a20a 100755
--- a/libremakepkg
+++ b/libremakepkg
@@ -57,7 +57,7 @@ while getopts ${libremakepkgargs} arg ; do
esac
done
-if [ $UID -ne 0 ]; then
+if [ !-w / ]; then
error "This script must be run as root"
exit 1
fi
diff --git a/librestage b/librestage
index 6ecb19c..f074672 100755
--- a/librestage
+++ b/librestage
@@ -79,7 +79,7 @@ for _arch in ${ARCHES[@]}; do
pkgpath=$(find ${PKGDEST}/ -type f -name "${pkg}-${pkgver}-${pkgrel}-${_arch}${PKGEXT}")
- [[ -z ${pkgpath} ]] && continue;
+ [[ -z ${pkgpath} ]] && continue
pkgfile=$(basename ${pkgpath})