index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <erich.eckner.ext@bestsecret.com> | 2023-05-22 16:37:16 +0200 |
---|---|---|
committer | Erich Eckner <erich.eckner.ext@bestsecret.com> | 2023-05-22 16:37:16 +0200 |
commit | 8f4872a2ba82be5fc50f6f1b7fa7ed5642f3dafd (patch) | |
tree | d6b5d77cdb741bba15604bcd27103bc435ab83f1 /lib | |
parent | 709590e525ff812f73c18f67496c068bd4da8659 (diff) |
-rwxr-xr-x | lib/common-functions | 19 |
diff --git a/lib/common-functions b/lib/common-functions index ba03fc1..9b439be 100755 --- a/lib/common-functions +++ b/lib/common-functions @@ -458,18 +458,19 @@ extract_source_directory() { local output="$5" local sub_pkgrel="$6" - local pkgbase_translated - pkgbase_translated=$( - printf '%s\n' "${pkgbase}" \ - | sed ' - s@+@plus@g - ' - ) if [ -n "${revision}" ] \ && [ "${revision}" != '0000000000000000000000000000000000000000' ]; then - curl -LSs "https://buildmaster.archlinux32.org/upstream-packages/${pkgbase_translated}-${revision}.tar.gz" \ - |tar -xz --strip-components=1 -C "${output}" -- "${pkgbase_translated}-${revision}" + local pkgbase_translated + for substitution in '' 's@+@plus@g' 's@+@-@g'; do + pkgbase_translated=$( + printf '%s\n' "${pkgbase}" \ + | sed "${substitution}" + ) + curl -LSs "https://buildmaster.archlinux32.org/upstream-packages/${pkgbase_translated}-${revision}.tar.gz" \ + | tar -xz --strip-components=1 -C "${output}" -- "${pkgbase_translated}-${revision}" \ + && break + done printf '\n' >> \ "${output}/PKGBUILD" fi |