index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2023-05-23 23:53:51 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2023-05-23 23:53:51 +0200 |
commit | aaa455e2e41e10fdc75d61c7db29e3e5e5dd525f (patch) | |
tree | eff71d6274dd56d288671735bfae89d8f09d562d | |
parent | a2cce02c00cb71d9d77399ae1f50311bf8e45ecd (diff) |
-rwxr-xr-x | bin/build-packages | 30 |
diff --git a/bin/build-packages b/bin/build-packages index 059593c..56c60c3 100755 --- a/bin/build-packages +++ b/bin/build-packages @@ -532,6 +532,36 @@ while [ "${count}" -ne 0 ] && \ date -u --iso-8601=seconds | \ cut -d+ -f1 ).build-log" + ( # new shell is intentional + set -e + CARCH="${arch}" + . /usr/share/makepkg/util/source.sh + . PKGBUILD + printf '%s\n' "${source[@]}" \ + | grep '^git+' \ + | while read -r netfile; do + fragment=$(get_uri_fragment "$netfile") + [ -z "${fragment}" ] && continue + case "${fragment%%=*}" in + 'commit'|'tag') + ref="${fragment##*=}" + ;; + 'branch') + ref="origin/${fragment##*=}" + ;; + *) + continue + esac + path=$(get_filename "$netfile") + git init "${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}" + done + ) if CARCH="${arch}" makepkg --verifysource 2> "${log_file}"; then success=true rm "${log_file}" |