index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2023-05-24 07:35:53 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2023-05-24 07:35:53 +0200 |
commit | 255e2e1ff43fda550540085c7f223a380bfae59a (patch) | |
tree | 7772626ba99c094df13ac9edf26ca7ea80b0f107 /bin/build-packages | |
parent | 7e22c8c43c06d49594e895f4c775164541ae81cb (diff) |
-rwxr-xr-x | bin/build-packages | 17 |
diff --git a/bin/build-packages b/bin/build-packages index 821491a..d18f0e0 100755 --- a/bin/build-packages +++ b/bin/build-packages @@ -496,14 +496,11 @@ while [ "${count}" -ne 0 ] && \ set -e CARCH="${arch}" . /usr/share/makepkg/util/source.sh - eval "$( - sed ' - :a - s/^\(\S\+\)-/\1_/ - ta - ' PKGBUILD - )" - printf '%s\n' "${source[@]}" \ + bash -c ' # new shell is intentional + CARCH="'"${arch}"'" + . PKGBUILD + printf '"'"'%s\n'"'"' "${source[@]}" + ' \ | grep '^git+' \ | while read -r netfile; do fragment=$(get_uri_fragment "$netfile") @@ -519,13 +516,15 @@ while [ "${count}" -ne 0 ] && \ continue esac path=$(get_filename "$netfile") - git init "${path}" + [ -d "${path}" ] && continue + git init --bare "${path}" url=$(get_url "$netfile") url=${url#git+} url=${url%%#*} url=${url%%\?*} git -C "${path}" remote add origin "${url}" git -C "${path}" fetch --depth=1 origin "${ref}" + git -C "${path}" fetch --depth=1 origin done ) if CARCH="${arch}" makepkg --verifysource 2> "${log_file}"; then |