From df6e78794309c047bb020636d373d8cca183d009 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Mon, 22 May 2023 16:40:22 +0200 Subject: extract_source_directory: silence + final check * we allow for some commands to fail, if in the end we have a PKGBUILD --- lib/common-functions | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/common-functions b/lib/common-functions index 9b439be..0c01968 100755 --- a/lib/common-functions +++ b/lib/common-functions @@ -468,9 +468,14 @@ extract_source_directory() { | 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}" \ + | tar -xz --strip-components=1 -C "${output}" -- "${pkgbase_translated}-${revision}" 2>/dev/null \ && break done + if [ ! -f "${output}/PKGBUILD" ]; then + >&2 printf 'failed to download/extract a PKGBUILD from upstream archlinux for %s %s\n' \ + "${pkgbase}" "${revision}" + exit 1 + fi printf '\n' >> \ "${output}/PKGBUILD" fi -- cgit v1.2.3-70-g09d2