Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/get-package-updates12
1 files changed, 10 insertions, 2 deletions
diff --git a/bin/get-package-updates b/bin/get-package-updates
index 5f2ca88..399b665 100755
--- a/bin/get-package-updates
+++ b/bin/get-package-updates
@@ -49,7 +49,7 @@ done
declare -A old_repo_revisions
for repo in "${!repo_paths[@]}"; do
- old_repo_revisions["${repo}"]="$(cat ${base_dir}/work/${repo}.revision)"
+ old_repo_revisions["${repo}"]="$(cat ${base_dir}/work/${repo}.revision || echo NONE)"
done
# Check modified packages from the last update, and put them to the build list.
@@ -64,7 +64,15 @@ for repo in "${!repo_paths[@]}"; do
current_HEAD="$(
git -C "${repo_paths["${repo}"]}" rev-parse HEAD
)"
- git -C "${repo_paths["${repo}"]}" diff --name-status "${old_repo_revisions["${repo}"]}" HEAD | \
+ (
+ if [ "${old_repo_revisions["${repo}"]}" == "NONE" ]; then
+ git -C "${repo_paths["${repo}"]}" archive --format=tar HEAD | \
+ tar -t | \
+ sed 's|^|A\t|'
+ else
+ git -C "${repo_paths["${repo}"]}" diff --name-status "${old_repo_revisions["${repo}"]}" HEAD
+ fi
+ ) | \
grep '^.\s[^/]\+/repos/[^/]\+/PKGBUILD$' | \
sed 's|^\(.\)\t\([^/]\+\)/repos/\([^/]\+\)-[^/-]\+/PKGBUILD$|\1 \2 '"${current_HEAD}"' \3|' | \
grep -v '\(staging\|testing\)$'