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:
parent
1df6799747
commit
b9070bf0b8
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue