diff options
Diffstat (limited to 'src/chroot-tools/chcleanup')
-rwxr-xr-x | src/chroot-tools/chcleanup | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/chroot-tools/chcleanup b/src/chroot-tools/chcleanup index a72f951..bfb65ce 100755 --- a/src/chroot-tools/chcleanup +++ b/src/chroot-tools/chcleanup @@ -50,11 +50,6 @@ msg2() { printf "${BLUE} ->${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&2 } -warning() { - local mesg="$(_ "$1")"; shift - printf "${YELLOW}==> $(gettext "WARNING:")${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&2 -} - error() { local mesg="$(_ "$1")"; shift printf "${RED}==> $(gettext "ERROR:")${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&2 @@ -83,8 +78,8 @@ msg "Cleaning chroot..." cp /repo/repo.db /var/lib/pacman/sync/repo.db # Setup the temporary directory -TEMPDIR="$(mktemp --tmpdir -d $(basename $0).XXXXX)" -trap "rm -rf '$TEMPDIR'" EXIT +TEMPDIR="$(mktemp --tmpdir -d ${0##*/}.XXXXXXXXXX)" +trap "rm -rf -- $(printf '%q' "$TEMPDIR")" EXIT cp -a /var/lib/pacman/sync "${TEMPDIR}/" pkglist="${TEMPDIR}"/pkglist.txt |