summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2011-09-12 08:27:13 -0400
committerDave Reisner <dreisner@archlinux.org>2011-09-12 08:27:13 -0400
commit0f69e2ec0b3958167a2ea7a5fcef40cb966d05d1 (patch)
tree84927e3901f1c93fe3450131c125862a41ea2824 /scripts
parent3905ada993bacba31a1a9005fe4a0023890296d9 (diff)
makepkg: check for var existance before file existance
This prevents makepkg from aborting with 'file not found' when changelog= or install= are declared in a PKGBUILD, but empty. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/makepkg.sh.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index b678f7e5..4f34feb6 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -1539,7 +1539,7 @@ check_sanity() {
while read -r file; do
# evaluate any bash variables used
eval file=\"$(sed 's/^\(['\''"]\)\(.*\)\1$/\2/' <<< "$file")\"
- if [[ ! -f $file ]]; then
+ if [[ $file && ! -f $file ]]; then
error "$(gettext "%s file (%s) does not exist.")" "$i" "$file"
ret=1
fi