index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
-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 |