summaryrefslogtreecommitdiff
path: root/src/chroot-tools/chcleanup
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2014-03-25 21:44:14 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2014-03-25 21:44:14 -0400
commit8831cc585ae8e9071f8c022bdfaf75e42029d7e4 (patch)
tree7f63f7708efbd5f8b32a0ded15fedfa28c562b7f /src/chroot-tools/chcleanup
parentae871fca2853bc3e5bf14587caecfa0436ba03a3 (diff)
Fix quoting/escaping with 'rm' in traps.
Diffstat (limited to 'src/chroot-tools/chcleanup')
-rwxr-xr-xsrc/chroot-tools/chcleanup2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/chroot-tools/chcleanup b/src/chroot-tools/chcleanup
index 6432d5b..bfb65ce 100755
--- a/src/chroot-tools/chcleanup
+++ b/src/chroot-tools/chcleanup
@@ -79,7 +79,7 @@ cp /repo/repo.db /var/lib/pacman/sync/repo.db
# Setup the temporary directory
TEMPDIR="$(mktemp --tmpdir -d ${0##*/}.XXXXXXXXXX)"
-trap "rm -rf '$TEMPDIR'" EXIT
+trap "rm -rf -- $(printf '%q' "$TEMPDIR")" EXIT
cp -a /var/lib/pacman/sync "${TEMPDIR}/"
pkglist="${TEMPDIR}"/pkglist.txt