index : devtools32 | |
Archlinux32 fork of devtools | gitolite user |
summaryrefslogtreecommitdiff |
-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 } |