From f42a4c74f8d9422c3ef5101dda199ed988dffd09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joshua=20Ismael=20Haase=20Hern=C3=A1ndez?= Date: Sun, 5 Jun 2011 15:58:50 -0500 Subject: * [ ! -w "/" ] expression to check root failed. --- libremakepkg | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libremakepkg b/libremakepkg index b02b778..b0e1371 100755 --- a/libremakepkg +++ b/libremakepkg @@ -60,13 +60,15 @@ while getopts ${libremakepkgargs} arg ; do esac done -if [ !-w / ]; then +if [ $UID -ne 0 ]; then error "This script must be run as root" exit 1 fi msg "Checking PKGBUILD for non-free issues" pkgbuild-check-nonfree ||{ +# pkgbuild-check-nonfree uses 15 for nonfree and +# other errors if something failed. if [[ $? -eq 15 ]]; then error "PKGBUILD contains non-free issues" exit 15 @@ -75,7 +77,7 @@ pkgbuild-check-nonfree ||{ if [ $update_first = y ]; then msg "Updating the main chroot" - # -c option in mkarchroot indicates cache +# -c option in mkarchroot indicates cache mkarchroot -c ${CACHEDIR} -u "${CHROOTDIR}/${CHROOT}" fi -- cgit v1.1-4-g5e80