diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2016-04-05 20:35:34 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2016-04-05 20:35:34 +0000 |
commit | d413730550eb1d6fa28be5b48778f156c504d75d (patch) | |
tree | d013f53be54fee3fcccf95721a189b5eab5b805c | |
parent | 3e69161ff7f18026293abe81493d0f13f67e4c9d (diff) | |
download | abuild-d413730550eb1d6fa28be5b48778f156c504d75d.tar.gz abuild-d413730550eb1d6fa28be5b48778f156c504d75d.tar.bz2 abuild-d413730550eb1d6fa28be5b48778f156c504d75d.tar.xz abuild-d413730550eb1d6fa28be5b48778f156c504d75d.zip |
abuild: don't cd to $builddir unless patches exists
some packages don't have patches. We should not error if builddir is not
set in this case.
-rw-r--r-- | abuild.in | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -530,8 +530,21 @@ getpkgver() { fi } +have_patches() { + local i + for i in $source; do + case "$i" in + *.patch) return 0;; + esac + done + return 1 +} + default_prepare() { local i + if ! have_patches; then + return 0 + fi cd "${builddir:-$srcdir/$pkgname-$pkgver}" \ || { error "Is \$builddir set correctly?"; return 1; } for i in $source; do |