diff options
author | Jo-Philipp Wich <jo@mein.io> | 2020-02-24 16:23:49 +0100 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2020-02-24 16:23:49 +0100 |
commit | c6ce80e36f2e70c941492254f0ac2e8f159cb832 (patch) | |
tree | 52a129a3c858c97be00d63318664d2f614455f76 /applications/luci-app-opkg/root/usr/libexec/opkg-list | |
parent | 562425605af51443986cb2596199564e4102ffff (diff) |
luci-app-opkg: full convert to client side actions
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'applications/luci-app-opkg/root/usr/libexec/opkg-list')
-rwxr-xr-x | applications/luci-app-opkg/root/usr/libexec/opkg-list | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/applications/luci-app-opkg/root/usr/libexec/opkg-list b/applications/luci-app-opkg/root/usr/libexec/opkg-list new file mode 100755 index 000000000..088bc6339 --- /dev/null +++ b/applications/luci-app-opkg/root/usr/libexec/opkg-list @@ -0,0 +1,15 @@ +#!/bin/sh + +case "$1" in + installed) + cat /usr/lib/opkg/status + ;; + available) + lists_dir=$(sed -rne 's#^lists_dir \S+ (\S+)#\1#p' /etc/opkg.conf /etc/opkg/*.conf 2>/dev/null | tail -n 1) + find "${lists_dir:-/tmp/opkg-lists}" -type f '!' -name '*.sig' | xargs -r gzip -cd + ;; + *) + echo "Usage: $0 {installed|available}" >&2 + exit 1 + ;; +esac |