summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-01-17 10:35:54 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-01-17 10:35:54 +0000
commit469786dd756f35e96bdbadadb38dd5bd10426e8c (patch)
tree603fddc000edc92d0fa3b75f90f8625c8648aa53
parent7534b15bb379014cb5aeabca795684220af09d76 (diff)
downloadabuild-469786dd756f35e96bdbadadb38dd5bd10426e8c.tar.gz
abuild-469786dd756f35e96bdbadadb38dd5bd10426e8c.tar.bz2
abuild-469786dd756f35e96bdbadadb38dd5bd10426e8c.tar.xz
abuild-469786dd756f35e96bdbadadb38dd5bd10426e8c.zip
abuild: allow help (-h) even if there is no APKBUILD
-rwxr-xr-xabuild11
1 files changed, 5 insertions, 6 deletions
diff --git a/abuild b/abuild
index 6da844f..23cc64e 100755
--- a/abuild
+++ b/abuild
@@ -536,7 +536,7 @@ usage() {
echo " -u Recursively build and upgrade dependencies (using sudo)"
echo ""
echo "Commands:"
- echo " checksum Generate checksum to be included in $APKBUILD"
+ echo " checksum Generate checksum to be included in APKBUILD"
echo " fetch Fetch sources to \$SRCDEST and verify checksums"
echo " sanitycheck Basic sanity check of APKBUILD"
echo " md5check Check md5sums"
@@ -555,12 +555,7 @@ usage() {
exit 0
}
-
-# source the buildfile
APKBUILD="${APKBUILD:-./APKBUILD}"
-[ -f "$APKBUILD" ] || die "Could not find $APKBUILD (PWD=$PWD)"
-. "$APKBUILD"
-
unset force
unset recursive
while getopts "fhi:kip:qrs:u" opt; do
@@ -579,6 +574,10 @@ while getopts "fhi:kip:qrs:u" opt; do
done
shift $(( $OPTIND - 1 ))
+# source the buildfile
+[ -f "$APKBUILD" ] || die "Could not find $APKBUILD (PWD=$PWD)"
+. "$APKBUILD"
+
# If we are handling a sub package then reset subpackages
if [ -n "$subpkgname" ]; then
subpackages=