Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/common-functions
diff options
context:
space:
mode:
authorErich Eckner <erich.eckner.ext@bestsecret.com>2023-05-22 16:37:16 +0200
committerErich Eckner <erich.eckner.ext@bestsecret.com>2023-05-22 16:37:16 +0200
commit8f4872a2ba82be5fc50f6f1b7fa7ed5642f3dafd (patch)
treed6b5d77cdb741bba15604bcd27103bc435ab83f1 /lib/common-functions
parent709590e525ff812f73c18f67496c068bd4da8659 (diff)
fix pkgbase_translation
apparently, sometimes "+" is translated by "-" - see e.g. https://gitlab.archlinux.org/archlinux/packaging/packages/gtk2-extra what a mess
Diffstat (limited to 'lib/common-functions')
-rwxr-xr-xlib/common-functions19
1 files changed, 10 insertions, 9 deletions
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