Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2023-06-23 07:10:52 +0200
committerAndreas Baumann <mail@andreasbaumann.cc>2023-06-23 07:10:52 +0200
commit58fca7807a2b61bbd983c9e8cb542f8a3bebb8ea (patch)
tree460351169eec193e02ec0c5f3a8adcafd9d9c0df
parent49e8c981ea3df771605c835e851a4b59beace085 (diff)
pkgctl --arch32: check out also build-support, do not overwrite PKGBUILD if we already have one
-rw-r--r--src/lib/repo/arch32.sh25
1 files changed, 16 insertions, 9 deletions
diff --git a/src/lib/repo/arch32.sh b/src/lib/repo/arch32.sh
index d1039ed..3ee248e 100644
--- a/src/lib/repo/arch32.sh
+++ b/src/lib/repo/arch32.sh
@@ -11,16 +11,23 @@ pkgctl_repo_patch_arch32() {
"${pkgname}/PKGBUILD"
# iterate the arch32 diffs in the archlinux32/master branch (we don't know
- # the destination repo, so we just scan both 'core' and 'extra')
+ # the destination repo, so we just scan both 'core' and 'extra' as well as
+ # 'build-support')
listfile=$(mktemp --tmpdir="${WORKDIR}" pkgctl-arch32.XXXXXXXXXX)
- git -C "${pkgname}" ls-tree -r --name-only archlinux32/master "core/${pkgname}" >"${listfile}"
- git -C "${pkgname}" ls-tree -r --name-only archlinux32/master "extra/${pkgname}" >>"${listfile}"
+ >"${listfile}"
+ for repo in core extra build-support; do
+ git -C "${pkgname}" ls-tree -r --name-only archlinux32/master "${repo}/${pkgname}" >>"${listfile}"
+ done
for file in $(cat "${listfile}"); do
- if [[ "${file##*/}" = "PKGBUILD" ]]; then
- printf "\n\n# -- Arch32 specific --\n\n" >> "${pkgname}/PKGBUILD"
- git -C "${pkgname}" show archlinux32/master:"${file}" >> "${pkgname}/PKGBUILD"
- else
- git -C "${pkgname}" show archlinux32/master:"${file}" > "${pkgname}/${file##*/}"
- fi
+ if [[ "${file##*/}" = "PKGBUILD" ]]; then
+ if [ -f "${pkgname}/PKGBUILD" ]; then
+ printf "\n\n# -- Arch32 specific --\n\n" >> "${pkgname}/PKGBUILD"
+ git -C "${pkgname}" show archlinux32/master:"${file}" >> "${pkgname}/PKGBUILD"
+ else
+ git -C "${pkgname}" show archlinux32/master:"${file}" > "${pkgname}/PKGBUILD"
+ fi
+ else
+ git -C "${pkgname}" show archlinux32/master:"${file}" > "${pkgname}/${file##*/}"
+ fi
done
}