Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xlib/common-functions7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/common-functions b/lib/common-functions
index 19d608c..02fd36b 100755
--- a/lib/common-functions
+++ b/lib/common-functions
@@ -457,11 +457,11 @@ extract_source_directory() {
local output="$5"
local sub_pkgrel="$6"
- if [ -n "${rev}" ] \
- && [ "${rev}" != '0000000000000000000000000000000000000000' ]; then
+ 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 -C "${output}"
+ |tar -xz --strip-components=1 -C "${output}" -- "${pkgbase}-${revision}"
printf '\n' >> \
"${output}/PKGBUILD"
fi
@@ -490,7 +490,6 @@ extract_source_directory() {
# we don't want write permissions on the PKGBUILD - otherwise pkgver()
# will change the version! (**HACK**)
chmod oga-w "${output}/PKGBUILD"
-
}
# download_sources_by_hash