index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2017-06-02 11:20:30 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2017-06-02 11:20:30 +0200 |
commit | 0016717217f6fc2be8c702b171382cb33b8a381a (patch) | |
tree | 561ba4aebbf232aafec51d8f1d14380da1eb39a7 | |
parent | 9adb204b5a81f5ed4098fbb1f56aea41ba7a2c00 (diff) |
-rwxr-xr-x | bin/return-assignment | 10 |
diff --git a/bin/return-assignment b/bin/return-assignment index e65bcfa..1f3267c 100755 --- a/bin/return-assignment +++ b/bin/return-assignment @@ -15,7 +15,6 @@ # 4: package error (e.g. wrong packages sent) # TODO: -# remove old version(s) of newly compiled packages # fix signing of database . "${0%/*}/../conf/default.conf" @@ -136,6 +135,15 @@ mv *.pkg.tar.xz{,.sig} "${master_mirror_directory}/i686/$4-staging/" cd "${master_mirror_directory}/i686/$4-staging" repo-add "$4-staging.db.tar.gz" "${packages[@]}" # repo-add -v -s -k "${repo_key}" "$4-staging.db.tar.gz" "${packages[@]}" + + # remove old versions of same packages + for package in "${packages[@]}"; do + pkgname="${package%-*-*-*.pkg.tar.xz}" + ls | \ + grep "^${pkgname//./\\.}\(-[^-]\+\)\{3\}\.pkg\.tar\.xz\(\.sig\)\?\$" | \ + grep -v "^${package//./\\.}\(\.sig\)\?\$" | \ + xargs -rn1 rm + done ) # remove all loops which are broken by this package |