Commit 22cf700b authored by Natanael Copa's avatar Natanael Copa

abuild: -k option for keeping built packages

parent 2d0758cf
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment