diff options
author | P. J. McDermott <pj@pehjota.net> | 2014-08-27 23:15:22 (EDT) |
---|---|---|
committer | P. J. McDermott <pj@pehjota.net> | 2014-08-27 23:15:22 (EDT) |
commit | a07e5359033b85a99824707ff2fde6e5ae674aed (patch) | |
tree | 3bfc1019ef1ea556aa2e67ce0d898d4a30d46701 /lib/cmd | |
parent | 2b27b076a846929ba156e51a93ec3d4fb7087fde (diff) |
opkg: rm opks in just one command
Diffstat (limited to 'lib/cmd')
-rw-r--r-- | lib/cmd/opkg.sh | 10 |
1 files changed, 6 insertions, 4 deletions
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 } |