index : devtools32 | |
Archlinux32 fork of devtools | gitolite user |
summaryrefslogtreecommitdiff |
author | Andreas Baumann <mail@andreasbaumann.cc> | 2023-06-23 07:10:52 +0200 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2023-06-23 07:10:52 +0200 |
commit | 58fca7807a2b61bbd983c9e8cb542f8a3bebb8ea (patch) | |
tree | 460351169eec193e02ec0c5f3a8adcafd9d9c0df | |
parent | 49e8c981ea3df771605c835e851a4b59beace085 (diff) |
-rw-r--r-- | src/lib/repo/arch32.sh | 25 |
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 } |