diff options
author | Joshua Ismael Haase Hernández <hahj87@gmail.com> | 2011-06-05 15:58:50 -0500 |
---|---|---|
committer | Joshua Ismael Haase Hernández <hahj87@gmail.com> | 2011-06-05 15:58:50 -0500 |
commit | f42a4c74f8d9422c3ef5101dda199ed988dffd09 (patch) | |
tree | 15f629f1d2a9a0e3057e064465348c97cc2a8117 | |
parent | 6b6dbb4fc42f27b0e30cdca3d9d1c471d086c1a5 (diff) |
* [ ! -w "/" ] expression to check root failed.
-rwxr-xr-x | libremakepkg | 6 |
1 files 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 |