summaryrefslogtreecommitdiffstats
path: root/lib/cmd/opkg.sh
diff options
context:
space:
mode:
Diffstat (limited to 'lib/cmd/opkg.sh')
-rw-r--r--lib/cmd/opkg.sh10
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
}