From b9070bf0b8b6e8f154c718074058dba9c03b01e0 Mon Sep 17 00:00:00 2001 From: "Jan Alexander Steffens (heftig)" Date: Sat, 17 Sep 2011 15:14:08 +0200 Subject: makechrootpkg: Use nullglob Use nullglob instead of checking for existence. If the glob doesn't match any files, it will be removed instead of staying unexpanded. Signed-off-by: Lukas Fleischer --- makechrootpkg.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/makechrootpkg.in b/makechrootpkg.in index 1bed6b8..11fa401 100644 --- a/makechrootpkg.in +++ b/makechrootpkg.in @@ -8,6 +8,8 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. +shopt -s nullglob + makepkg_args='-s --noconfirm' repack=false update_first=false @@ -265,7 +267,6 @@ chmod +x "$copydir/chrootbuild" if mkarchroot -r "/chrootbuild" "$copydir"; then for pkgfile in "$copydir"/pkgdest/*.pkg.tar.*; do - [[ -e $pkgfile ]] || continue if $add_to_db; then mkdir -p "$copydir/repo" pushd "$copydir/repo" >/dev/null @@ -286,7 +287,6 @@ else fi for f in "$copydir"/srcdest/*; do - [[ -e $f ]] || continue mv "$f" "$SRCDEST" done -- cgit v1.2.3-70-g09d2