Commit 2ccb246b authored by Vitaly Lipatov's avatar Vitaly Lipatov

switch from ipkg to opkg for OpenWrt

parent 18be4a64
...@@ -109,8 +109,8 @@ case $PMTYPE in ...@@ -109,8 +109,8 @@ case $PMTYPE in
slackpkg) slackpkg)
docmd /usr/sbin/slackpkg info $pkg_names docmd /usr/sbin/slackpkg info $pkg_names
;; ;;
ipkg) opkg)
docmd ipkg info $pkg_names docmd opkg info $pkg_names
;; ;;
pkgng) pkgng)
docmd pkg info $pkg_names docmd pkg info $pkg_names
......
...@@ -173,9 +173,9 @@ epm_install_names() ...@@ -173,9 +173,9 @@ epm_install_names()
# FIXME: sudo and quote # FIXME: sudo and quote
SUDO='' __separate_sudocmd "brew install" "brew upgrade" "$@" SUDO='' __separate_sudocmd "brew install" "brew upgrade" "$@"
return ;; return ;;
ipkg) opkg)
[ -n "$force" ] && force=-force-depends [ -n "$force" ] && force=-force-depends
sudocmd ipkg $force install $@ sudocmd opkg $force install $@
return ;; return ;;
nix) nix)
__separate_sudocmd "nix-env --install" "nix-env --upgrade" "$@" __separate_sudocmd "nix-env --install" "nix-env --upgrade" "$@"
...@@ -252,8 +252,8 @@ epm_ni_install_names() ...@@ -252,8 +252,8 @@ epm_ni_install_names()
chocolatey) chocolatey)
docmd chocolatey install $@ docmd chocolatey install $@
return ;; return ;;
ipkg) opkg)
sudocmd ipkg -force-defaults install $@ sudocmd opkg -force-defaults install $@
return ;; return ;;
nix) nix)
sudocmd nix-env --install $@ sudocmd nix-env --install $@
...@@ -468,8 +468,8 @@ epm_print_install_command() ...@@ -468,8 +468,8 @@ epm_print_install_command()
npackd) npackd)
echo "npackdcl add --package=$*" echo "npackdcl add --package=$*"
;; ;;
ipkg) opkg)
echo "ipkg install $*" echo "opkg install $*"
;; ;;
android) android)
echo "pm install $*" echo "pm install $*"
......
...@@ -138,8 +138,8 @@ case $PMTYPE in ...@@ -138,8 +138,8 @@ case $PMTYPE in
homebrew) homebrew)
docmd brew list | xargs -n1 echo docmd brew list | xargs -n1 echo
;; ;;
ipkg) opkg)
CMD="ipkg list" CMD="opkg list"
;; ;;
apk) apk)
CMD="apk info" CMD="apk info"
......
...@@ -109,8 +109,8 @@ __do_query() ...@@ -109,8 +109,8 @@ __do_query()
docmd grep -R -- "$(echo $@ | sed -e 's|^/\+||g')" /var/log/packages | sed -e "s|/var/log/packages/||g" docmd grep -R -- "$(echo $@ | sed -e 's|^/\+||g')" /var/log/packages | sed -e "s|/var/log/packages/||g"
return return
;; ;;
ipkg) opkg)
CMD="ipkg files" CMD="opkg files"
;; ;;
xbps) xbps)
# FIXME: maybe it is search file? # FIXME: maybe it is search file?
......
...@@ -139,9 +139,9 @@ epm_remove_names() ...@@ -139,9 +139,9 @@ epm_remove_names()
xbps) xbps)
sudocmd xbps remove -R $@ sudocmd xbps remove -R $@
return ;; return ;;
ipkg) opkg)
# shellcheck disable=SC2046 # shellcheck disable=SC2046
sudocmd ipkg $(subst_option force -force-depends) remove $@ sudocmd opkg $(subst_option force -force-depends) remove $@
return ;; return ;;
*) *)
fatal "Have no suitable command for $PMTYPE" fatal "Have no suitable command for $PMTYPE"
...@@ -185,8 +185,8 @@ epm_remove_nonint() ...@@ -185,8 +185,8 @@ epm_remove_nonint()
pkgng) pkgng)
sudocmd pkg delete -y -R $@ sudocmd pkg delete -y -R $@
return ;; return ;;
ipkg) opkg)
sudocmd ipkg -force-defaults remove $@ sudocmd opkg -force-defaults remove $@
return ;; return ;;
xbps) xbps)
sudocmd xbps remove -y $@ sudocmd xbps remove -y $@
...@@ -219,8 +219,8 @@ epm_print_remove_command() ...@@ -219,8 +219,8 @@ epm_print_remove_command()
slackpkg) slackpkg)
echo "/sbin/removepkg $*" echo "/sbin/removepkg $*"
;; ;;
ipkg) opkg)
echo "ipkg remove $*" echo "opkg remove $*"
;; ;;
aptcyg) aptcyg)
echo "apt-cyg remove $*" echo "apt-cyg remove $*"
......
...@@ -83,8 +83,8 @@ case $PMTYPE in ...@@ -83,8 +83,8 @@ case $PMTYPE in
slackpkg) slackpkg)
CMD="/usr/sbin/slackpkg file-search" CMD="/usr/sbin/slackpkg file-search"
;; ;;
ipkg) opkg)
CMD="ipkg search" CMD="opkg search"
;; ;;
xbps) xbps)
CMD="xbps-query -Ro" CMD="xbps-query -Ro"
......
...@@ -521,8 +521,8 @@ case $DISTRNAME in ...@@ -521,8 +521,8 @@ case $DISTRNAME in
MacOS) MacOS)
CMD="homebrew" CMD="homebrew"
;; ;;
OpenWRT) OpenWrt)
CMD="ipkg" CMD="opkg"
;; ;;
GNU/Linux/Guix) GNU/Linux/Guix)
CMD="guix" CMD="guix"
......
...@@ -81,8 +81,8 @@ case $PMTYPE in ...@@ -81,8 +81,8 @@ case $PMTYPE in
homebrew) homebrew)
docmd brew update docmd brew update
;; ;;
ipkg) opkg)
sudocmd ipkg update sudocmd opkg update
;; ;;
apk) apk)
sudocmd apk update sudocmd apk update
......
...@@ -86,8 +86,8 @@ epm_upgrade() ...@@ -86,8 +86,8 @@ epm_upgrade()
docmd "brew upgrade $(brew outdated)" docmd "brew upgrade $(brew outdated)"
return return
;; ;;
ipkg) opkg)
CMD="ipkg upgrade" CMD="opkg upgrade"
;; ;;
slackpkg) slackpkg)
CMD="/usr/sbin/slackpkg upgrade-all" CMD="/usr/sbin/slackpkg upgrade-all"
......
#!/bin/sh #!/bin/sh
# #
# Copyright (C) 2013, 2016 Etersoft # Copyright (C) 2013, 2016, 2018 Etersoft
# Copyright (C) 2013, 2016 Vitaly Lipatov <lav@etersoft.ru> # Copyright (C) 2013, 2016, 2018 Vitaly Lipatov <lav@etersoft.ru>
# #
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by # it under the terms of the GNU Affero General Public License as published by
...@@ -47,6 +47,9 @@ case $PMTYPE in ...@@ -47,6 +47,9 @@ case $PMTYPE in
zypper-rpm) zypper-rpm)
CMD="zypper what-provides" CMD="zypper what-provides"
;; ;;
opkg)
CMD="opkg whatprovides"
;;
*) *)
fatal "Have no suitable command for $PMTYPE" fatal "Have no suitable command for $PMTYPE"
;; ;;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment