Commit b9070bf0 authored by Jan Alexander Steffens (heftig)'s avatar Jan Alexander Steffens (heftig) Committed by Lukas Fleischer
Browse files

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: default avatarLukas Fleischer <archlinux@cryptocrack.de>
parent 1df67997
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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