From c7c582eabd2b133ba561de49982e21d5f3cae914 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Mon, 22 May 2023 11:03:47 +0200 Subject: extract_source_directory: translate "+" to "plus" in pkgbase before downloading --- lib/common-functions | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'lib') 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 -- cgit v1.2.3-54-g00ecf