summaryrefslogtreecommitdiffstats
path: root/src/opkg.sh
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2020-12-08 13:09:49 (EST)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2020-12-09 07:39:31 (EST)
commit7faf9cf935f4f4f2650f6d8b2198e530076e7c3f (patch)
tree229ef7db555a1d2f3c6725a443199b9e73837da7 /src/opkg.sh
parentca347b32c00e3d923c5df0ed41c75da6429f0495 (diff)
opkg_install_all(): Don't run cut in the root
Diffstat (limited to 'src/opkg.sh')
-rw-r--r--src/opkg.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/opkg.sh b/src/opkg.sh
index d801309..39b91ef 100644
--- a/src/opkg.sh
+++ b/src/opkg.sh
@@ -23,12 +23,15 @@ opkg_install_all()
local root="${1}"
shift 1
local es=
+ local pkgs=
session_begin "${root}" . true
es=0
- session_exec /bin/sh -c \
- 'opkg install $(opkg list-installed | cut -d " " -f 1)' || \
+ if ! pkgs="$(session_exec opkg list-installed | cut -d " " -f 1)"; then
es=${?}
+ session_end
+ fi
+ session_exec opkg install ${pkgs} || es=${?}
session_end
return ${es}