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