summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2017-05-17 16:24:37 +0200
committerErich Eckner <git@eckner.net>2017-05-17 16:24:37 +0200
commit37da2addff162dc932d216f07d59dd506db2e480 (patch)
tree8ebecb3b6c1b5c0016afe43bb737ce1b18e57a5d
parentc5a716a0f95a1ab7210e1b2e9c95452fa7b3fb55 (diff)
downloadbuilder-37da2addff162dc932d216f07d59dd506db2e480.tar.xz
bin/get-package-updates: remove cached values only if new values will be created (= accelerate script)
-rwxr-xr-xbin/get-package-updates16
1 files changed, 8 insertions, 8 deletions
diff --git a/bin/get-package-updates b/bin/get-package-updates
index 355166c..18fb835 100755
--- a/bin/get-package-updates
+++ b/bin/get-package-updates
@@ -126,20 +126,20 @@ rm -f "${work_dir}/build-order"
touch "${work_dir}/build-order"
while read -r package git_revision mod_git_revision repository; do
- # delete cached values of old versions of this PKGBUILD
- ls -1 "${work_dir}/package-infos/${package}."* 2> /dev/null | \
- sed 's|^.*/||' | \
- grep "^${package//./\\.}"'\.\([0-9a-f]\{40\}\.\)\{2\}\(builds\|needs\|packages\)$' | \
- grep -v "^${package//./\\.}\.${git_revision}\.${new_repo_revisions["archlinux32"]}"'\.\(builds\|needs\|packages\)$' | \
- while read file; do
- rm "${work_dir}/package-infos/${file}"
- done
# extract infos from PKGBUILD if not existent yet
if [ ! -e "${work_dir}/package-infos/${package}.${git_revision}.${new_repo_revisions["archlinux32"]}.builds" ] || \
[ ! -e "${work_dir}/package-infos/${package}.${git_revision}.${new_repo_revisions["archlinux32"]}.needs" ] || \
[ ! -e "${work_dir}/package-infos/${package}.${git_revision}.${new_repo_revisions["archlinux32"]}.packages" ]; then
+ # delete cached values of old versions of this PKGBUILD
+ ls -1 "${work_dir}/package-infos/${package}."* 2> /dev/null | \
+ sed 's|^.*/||' | \
+ grep "^${package//./\\.}"'\.\([0-9a-f]\{40\}\.\)\{2\}\(builds\|needs\|packages\)$' | \
+ while read file; do
+ rm "${work_dir}/package-infos/${file}"
+ done
+
PKGBUILD="$(find_pkgbuild "${package}" "${repository}")"
if [ ! -r "${PKGBUILD}" ]; then