Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rwxr-xr-xlib/common-functions10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/common-functions b/lib/common-functions
index 8960b0a..1ab3e72 100755
--- a/lib/common-functions
+++ b/lib/common-functions
@@ -480,9 +480,13 @@ extract_source_directory() {
>&2 echo 'Download upstream-package from upstream via buildmaster cache failed. Curl exit code was $res.'
return 1
fi
- tar -xz -f "${pkgtarfile}" --strip-components=1 -C "${output}" -- "${pkgbase_translated}-${revision}"
- printf '\n' >> \
- "${output}/PKGBUILD"
+ if [ -f "${pkgtarfile}" ]; then
+ tar -xz -f "${pkgtarfile}" --strip-components=1 -C "${output}" -- "${pkgbase_translated}-${revision}"
+ printf '\n' >> \
+ "${output}/PKGBUILD"
+ else
+ >&2 echo 'No upstream tarfile, assuming the package is a local one and has a full PKGBUILD not a diff-PKGBUILD.'
+ fi
fi
if [ -n "${mod_revision}" ] \