summaryrefslogtreecommitdiff
path: root/libremakepkg
diff options
context:
space:
mode:
Diffstat (limited to 'libremakepkg')
-rwxr-xr-xlibremakepkg6
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