index : devtools32 | |
Archlinux32 fork of devtools | gitolite user |
summaryrefslogtreecommitdiff |
author | Dan McGee <dan@archlinux.org> | 2007-11-27 17:54:58 -0600 |
---|---|---|
committer | Aaron Griffin <aaronmgriffin@gmail.com> | 2007-11-27 18:14:42 -0600 |
commit | 84f29cd82462fe7b215c0761ede8bb680f24651a (patch) | |
tree | b2ee35d121dcd0f28559f23a3e4634707c72220d /makechrootpkg | |
parent | e32a2bb70c584dec49f5fafc449184a2b6fa6560 (diff) |
-rwxr-xr-x | makechrootpkg | 22 |
diff --git a/makechrootpkg b/makechrootpkg index 1ebf705..2a6e1b0 100755 --- a/makechrootpkg +++ b/makechrootpkg @@ -16,17 +16,6 @@ chrootdir="$CHROOT_SHELL" APPNAME=$(basename "${0}") -if [ ! -f PKGBUILD ]; then - echo "This must be run in the directory of a built package." - exit 1 -fi -source PKGBUILD - -if [ "$EUID" != "0" ]; then - echo "This script must be run as root." - exit 1 -fi - usage () { echo "usage ${APPNAME} [-h] [-c CHROOT_SHELL] [--] [makepkg args]" @@ -61,6 +50,17 @@ done # Pass all arguments after -- right to makepkg MAKEPKG_ARGS="$MAKEPKG_ARGS ${*:$OPTIND}" +if [ "$EUID" != "0" ]; then + echo "This script must be run as root." + exit 1 +fi + +if [ ! -f PKGBUILD ]; then + echo "This must be run in a directory containing a PKGBUILD." + exit 1 +fi +source PKGBUILD + if [ ! -d "$chrootdir" ]; then echo "No \$CHROOT_SHELL defined, or invalid path" exit 1 |