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 <archlinux@cryptocrack.de>
This commit is contained in:
Jan Alexander Steffens (heftig) 2011-09-17 15:14:08 +02:00 committed by Lukas Fleischer
parent 1df6799747
commit b9070bf0b8
1 changed files with 2 additions and 2 deletions

View File

@ -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