From a07e5359033b85a99824707ff2fde6e5ae674aed Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Wed, 27 Aug 2014 23:15:22 -0400 Subject: opkg: rm opks in just one command --- diff --git a/lib/cmd/opkg.sh b/lib/cmd/opkg.sh index 97c20b9..3016773 100644 --- a/lib/cmd/opkg.sh +++ b/lib/cmd/opkg.sh @@ -56,7 +56,7 @@ cmd_opkg_main() fi rand new_fname="/tmp/prokit.${rand_x}.opk" - opks="${opks} ${new_fname}" + opks="${opks} ${root}${new_fname}" cp "${arg}" "${root}${new_fname}" set -- "${@}" "${new_fname}" ;; @@ -77,7 +77,9 @@ cmd_opkg_main() chroot_exec "${root}" opkg "${@}" - for new_fname in ${opks}; do - rm -f "${root}${new_fname}" - done + case "${opks}" in + *[!\ ]*) + rm -f ${opks} + ;; + esac } -- cgit v0.9.1