From 0f69e2ec0b3958167a2ea7a5fcef40cb966d05d1 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Mon, 12 Sep 2011 08:27:13 -0400 Subject: 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 --- scripts/makepkg.sh.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') 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 -- cgit v1.2.3-70-g09d2