summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Alexander Steffens (heftig) <jan.steffens@gmail.com>2011-09-17 15:14:08 +0200
committerLukas Fleischer <archlinux@cryptocrack.de>2011-10-07 21:53:03 +0200
commitb9070bf0b8b6e8f154c718074058dba9c03b01e0 (patch)
tree09e822331e99d74d29ea72e08af6e5e163779102
parent1df679974786fe4282fd675574d92a464c28f7cb (diff)
downloaddevtools-b9070bf0b8b6e8f154c718074058dba9c03b01e0.tar.gz
devtools-b9070bf0b8b6e8f154c718074058dba9c03b01e0.tar.xz
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>
-rw-r--r--makechrootpkg.in4
1 files 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