diff options
author | Dave Reisner <dreisner@archlinux.org> | 2011-11-10 06:05:11 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-11-10 09:22:17 -0600 |
commit | 42e2f8bfbf1361a891cea6b440071eed78a3d389 (patch) | |
tree | 5a5f59690c2ab785580a9f284bc6700bd6fb94be /scripts | |
parent | e7b56f48d704f57f023d7ca3cdc9d492fb31a9cb (diff) | |
download | pacman-42e2f8bfbf1361a891cea6b440071eed78a3d389.tar.xz |
makepkg: check for value before using eval'd var
This prevent bsdtar from exploding when install= or changelog= are
present without a value.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@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 5d048d28..085fbb91 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -1348,7 +1348,7 @@ create_srcpackage() { while read -r file; do # evaluate any bash variables used eval file=\"$(sed 's/^\(['\''"]\)\(.*\)\1$/\2/' <<< "$file")\" - if [[ ! -f "${srclinks}/${pkgbase}/$file" ]]; then + if [[ $file && ! -f "${srclinks}/${pkgbase}/$file" ]]; then msg2 "$(gettext "Adding %s file (%s)...")" "$i" "${file}" ln -s "${startdir}/$file" "${srclinks}/${pkgbase}/" fi |