summaryrefslogtreecommitdiffstats
path: root/abuild
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-01-06 14:52:47 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-01-06 14:52:47 +0000
commit22cf700b4964667a391c6f54a2b2955f2badbe0c (patch)
tree39c3ee60897057cd4cd5274feed5331018e743e5 /abuild
parent2d0758cfdf0f03d52dff5817b1d96b2b0e1e423a (diff)
downloadabuild-22cf700b4964667a391c6f54a2b2955f2badbe0c.tar.bz2
abuild-22cf700b4964667a391c6f54a2b2955f2badbe0c.tar.xz
abuild: -k option for keeping built packages
Diffstat (limited to 'abuild')
-rwxr-xr-xabuild10
1 files changed, 8 insertions, 2 deletions
diff --git a/abuild b/abuild
index df01ab2..f8b8c75 100755
--- a/abuild
+++ b/abuild
@@ -383,7 +383,11 @@ up2date() {
local pkg="$PKGDEST/$pkgname-$pkgver-r$pkgrel.apk"
local i s
cd "$startdir"
- [ -f "$pkg" ] || return 1
+ for i in $pkgname $subpackages; do
+ [ -f "$PKGDEST/$pkgname-$pkgver-r$pkgrel.apk" ] || return 1
+ done
+ [ -n "$keep" ] && return 0
+
for i in $source APKBUILD; do
local s
if is_remote "$i"; then
@@ -527,6 +531,7 @@ usage() {
echo " -f Force specified cmd, even if they are already done"
echo " -h Show this help"
echo " -i Install PKG after successul build"
+ echo " -k Keep built packages, even if APKBUILD or sources are newer"
echo " -q Quiet"
echo " -r Recursively build and install missing dependencies (using sudo)"
echo " -u Recursively build and upgrade dependencies (using sudo)"
@@ -555,11 +560,12 @@ APKBUILD="${APKBUILD:-./APKBUILD}"
unset force
unset recursive
-while getopts "fhi:qru" opt; do
+while getopts "fhi:kqru" opt; do
case $opt in
'f') force=1;;
'h') usage;;
'i') install_after="$install_after $OPTARG";;
+ 'k') keep=1;;
'q') quiet=1;;
'r') recursive=1;;
'u') upgrade=1