diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2013-02-22 10:12:43 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2013-03-09 11:08:17 +0000 |
commit | 074f43536dbd5bc05f80fcfdb9c72b9048a9a00c (patch) | |
tree | 750c79816e0057e03a8418e3695bd29ae027fd3a | |
parent | 73918f526c1ccfda7b0a078c16b912a94658a2b2 (diff) | |
download | abuild-074f43536dbd5bc05f80fcfdb9c72b9048a9a00c.tar.gz abuild-074f43536dbd5bc05f80fcfdb9c72b9048a9a00c.tar.bz2 abuild-074f43536dbd5bc05f80fcfdb9c72b9048a9a00c.tar.xz abuild-074f43536dbd5bc05f80fcfdb9c72b9048a9a00c.zip |
buildrepo: faster purging of old packages
-rwxr-xr-x | buildrepo.in | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/buildrepo.in b/buildrepo.in index da4e91b..2370db7 100755 --- a/buildrepo.in +++ b/buildrepo.in @@ -33,9 +33,22 @@ usage() { listpackages() { - cd "$aportsdir/$1" + local repo="$1" i= pkgname= pkgver= pkgrel= subpackage= arch= subpkg= + cd "$aportsdir/$repo" for i in */APKBUILD; do - APKBUILD=$i abuild listpkg + cd "$aportsdir/$repo"/${i%/*} || return 1 + pkgname= + pkgver= + pkgrel= + subpackages= + arch= + . ./APKBUILD + if ! is_in all $arch && ! is_in "$CARCH" $arch; then + continue + fi + for subpkg in $pkgname $subpackages; do + echo ${subpkg%:*}-$pkgver-r$pkgrel.apk + done done } |