diff options
author | Dave Reisner <dreisner@archlinux.org> | 2011-09-12 08:27:13 -0400 |
---|---|---|
committer | Dave Reisner <dreisner@archlinux.org> | 2011-09-12 08:27:13 -0400 |
commit | 0f69e2ec0b3958167a2ea7a5fcef40cb966d05d1 (patch) | |
tree | 84927e3901f1c93fe3450131c125862a41ea2824 /scripts | |
parent | 3905ada993bacba31a1a9005fe4a0023890296d9 (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.in | 2 |
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 |