abuild: added -p/-s option to override PKGDEST/SRCDEST
This commit is contained in:
parent
40f8a48bc6
commit
162f34d0da
16
abuild
16
abuild
@ -521,14 +521,16 @@ listpkg() {
|
|||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
echo "$(basename $0) $abuild_ver"
|
echo "$(basename $0) $abuild_ver"
|
||||||
echo "usage: $0 [options] [-i PKG] [cmd] ..."
|
echo "usage: $0 [options] [-i PKG] [-p PKGDEST] [-s SRCDEST] [cmd] ..."
|
||||||
echo "Options:"
|
echo "Options:"
|
||||||
echo " -f Force specified cmd, even if they are already done"
|
echo " -f Force specified cmd, even if they are already done"
|
||||||
echo " -h Show this help"
|
echo " -h Show this help"
|
||||||
echo " -i Install PKG after successul build"
|
echo " -i Install PKG after successul build"
|
||||||
echo " -k Keep built packages, even if APKBUILD or sources are newer"
|
echo " -k Keep built packages, even if APKBUILD or sources are newer"
|
||||||
|
echo " -p Set package destination directory"
|
||||||
echo " -q Quiet"
|
echo " -q Quiet"
|
||||||
echo " -r Recursively build and install missing dependencies (using sudo)"
|
echo " -r Recursively build and install missing dependencies (using sudo)"
|
||||||
|
echo " -s Set source package destination directory"
|
||||||
echo " -u Recursively build and upgrade dependencies (using sudo)"
|
echo " -u Recursively build and upgrade dependencies (using sudo)"
|
||||||
echo ""
|
echo ""
|
||||||
echo "Commands:"
|
echo "Commands:"
|
||||||
@ -551,28 +553,30 @@ usage() {
|
|||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# source the buildfile
|
||||||
APKBUILD="${APKBUILD:-./APKBUILD}"
|
APKBUILD="${APKBUILD:-./APKBUILD}"
|
||||||
|
[ -f "$APKBUILD" ] || die "Could not find $APKBUILD (PWD=$PWD)"
|
||||||
|
. "$APKBUILD"
|
||||||
|
|
||||||
unset force
|
unset force
|
||||||
unset recursive
|
unset recursive
|
||||||
while getopts "fhi:kqru" opt; do
|
while getopts "fhi:kip:qrs:u" opt; do
|
||||||
case $opt in
|
case $opt in
|
||||||
'f') force=1;;
|
'f') force=1;;
|
||||||
'h') usage;;
|
'h') usage;;
|
||||||
'i') install_after="$install_after $OPTARG";;
|
'i') install_after="$install_after $OPTARG";;
|
||||||
'k') keep=1;;
|
'k') keep=1;;
|
||||||
|
'p') PKGDEST=$OPTARG;;
|
||||||
'q') quiet=1;;
|
'q') quiet=1;;
|
||||||
'r') recursive=1;;
|
'r') recursive=1;;
|
||||||
|
's') SRCDEST=$OPTARG;;
|
||||||
'u') upgrade=1
|
'u') upgrade=1
|
||||||
recursive=1;;
|
recursive=1;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
shift $(( $OPTIND - 1 ))
|
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 we are handling a sub package then reset subpackages
|
||||||
if [ -n "$subpkgname" ]; then
|
if [ -n "$subpkgname" ]; then
|
||||||
subpackages=
|
subpackages=
|
||||||
|
Loading…
x
Reference in New Issue
Block a user