Skip to content
Snippets Groups Projects
Commit 22cf700b authored by Natanael Copa's avatar Natanael Copa
Browse files

abuild: -k option for keeping built packages

parent 2d0758cf
No related branches found
No related tags found
No related merge requests found
...@@ -383,7 +383,11 @@ up2date() { ...@@ -383,7 +383,11 @@ up2date() {
local pkg="$PKGDEST/$pkgname-$pkgver-r$pkgrel.apk" local pkg="$PKGDEST/$pkgname-$pkgver-r$pkgrel.apk"
local i s local i s
cd "$startdir" 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 for i in $source APKBUILD; do
local s local s
if is_remote "$i"; then if is_remote "$i"; then
...@@ -527,6 +531,7 @@ usage() { ...@@ -527,6 +531,7 @@ usage() {
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 " -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 " -u Recursively build and upgrade dependencies (using sudo)" echo " -u Recursively build and upgrade dependencies (using sudo)"
...@@ -555,11 +560,12 @@ APKBUILD="${APKBUILD:-./APKBUILD}" ...@@ -555,11 +560,12 @@ APKBUILD="${APKBUILD:-./APKBUILD}"
unset force unset force
unset recursive unset recursive
while getopts "fhi:qru" opt; do while getopts "fhi:kqru" 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;;
'q') quiet=1;; 'q') quiet=1;;
'r') recursive=1;; 'r') recursive=1;;
'u') upgrade=1 'u') upgrade=1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment