Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <erich.eckner.ext@bestsecret.com>2023-05-22 11:03:47 +0200
committerErich Eckner <erich.eckner.ext@bestsecret.com>2023-05-22 11:03:47 +0200
commitc7c582eabd2b133ba561de49982e21d5f3cae914 (patch)
tree68f0e2ee16413af4feb61200d120d868a253d34a
parente72fc0321679bbc40482a5afc04448dd3989ca5e (diff)
extract_source_directory: translate "+" to "plus" in pkgbase before downloading
-rwxr-xr-xlib/common-functions11
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/common-functions b/lib/common-functions
index bf5d99c..3a7d635 100755
--- a/lib/common-functions
+++ b/lib/common-functions
@@ -457,11 +457,18 @@ extract_source_directory() {
local output="$5"
local sub_pkgrel="$6"
+ local pkgbase_translated=$(
+ printf '%s\n' "${pkgbase}" \
+ | sed '
+ s@+@plus@g
+ '
+ )
+
if [ -n "${revision}" ] \
&& [ "${revision}" != '0000000000000000000000000000000000000000' ]; then
# TODO: use cache, here
- curl -LSs "https://gitlab.archlinux.org/archlinux/packaging/packages/${pkgbase}/-/archive/${revision}/${pkgbase}-${revision}.tar.gz" \
- |tar -xz --strip-components=1 -C "${output}" -- "${pkgbase}-${revision}"
+ curl -LSs "https://gitlab.archlinux.org/archlinux/packaging/packages/${pkgbase_translated}/-/archive/${revision}/${pkgbase_translated}-${revision}.tar.gz" \
+ |tar -xz --strip-components=1 -C "${output}" -- "${pkgbase_translated}-${revision}"
printf '\n' >> \
"${output}/PKGBUILD"
fi