Skip to content

Commit f0b23b6

Browse files
committed
openwrt-openvfd: support apk package manager
1 parent 2d7a899 commit f0b23b6

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

make-openwrt/openwrt-files/common-files/usr/sbin/openwrt-openvfd

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,13 @@ do_update_conf() {
5454
echo -e "${STEPS} Start updating the openfvd config files..."
5555

5656
# Check dependencies
57-
[[ -z "$(opkg list-installed | awk '{print $1}' | grep -w '^git$')" ]] && opkg update && opkg install --force-reinstall git
57+
if command -v opkg >/dev/null 2>&1; then
58+
[[ -z "$(opkg list-installed | awk '{print $1}' | grep -w '^git$')" ]] && opkg update && opkg install --force-reinstall git
59+
elif command -v apk >/dev/null 2>&1; then
60+
[[ -z "$(apk list --installed | grep '^git-')" ]] && apk update && apk add --force-overwrite --allow-untrusted git
61+
else
62+
error_msg "Package manager not found, please install git manually."
63+
fi
5864

5965
# Get the latest scripts
6066
git_tmp_path="$(mktemp -d)"

0 commit comments

Comments
 (0)