v0.3.0
v0.3.0 :
- Sort package list by package names
- Ignore opkg warnings
opkg list-upgradable
may print something like"Multiple packages (libpthread and libpthread) providing same name marked HOLD or PREFER. Using latest."
within the list. This used to cause an error because it would be parsed as a package name.- It was kind of rare though. I THINK it only happens on TRUNK/BETA versions that are very old.
- Use
awk + printf
to print an ASCII table of the updates (prettier)
Example of the new/prettier package list:
# ./opkg-upgrade.sh -n
Simple OPKG Updater v0.3.0
Done | Ignoring package lists update
Done | Getting upgradable packages list
Packages available for upgrade: 74
+-----+--------------------------+----------------------------+----------------------------+
| # | Package | Current | Update |
+-----+--------------------------+----------------------------+----------------------------+
| 1 | busybox | 1.28.3-3 | 1.29.3-3 |
| 2 | dropbear | 2017.75-5 | 2017.75-8 |
| 3 | firewall | 2018-05-19-30463d08-1 | 2018-12-06-14589c80-2 |
| 4 | fstools | 2018-05-23-dd02dad3-1 | 2018-09-29-29e53af0-3 |
| 5 | hostapd-common | 2018-05-21-62566bc2-4 | 2018-05-21-62566bc2-6 |
| 6 | ip6tables | 1.6.2-1 | 1.8.2-2 |
| 7 | iptables | 1.6.2-1 | 1.8.2-2 |
| 8 | iwinfo | 2018-05-18-e59f9253-1 | 2018-07-31-65b8333f-1 |
| 9 | jshn | 2018-04-12-6eff829d-1 | 2018-07-25-c83a84af-2 |
| 10 | kmod-ath | 4.9.107+2017-11-01-9 | 4.14.82+4.19-rc5-1-1 |
| 11 | kmod-ath10k | 4.9.107+2017-11-01-9 | 4.14.82+4.19-rc5-1-1 |
| 12 | kmod-ath9k | 4.9.107+2017-11-01-9 | 4.14.82+4.19-rc5-1-1 |
| 13 | kmod-ath9k-common | 4.9.107+2017-11-01-9 | 4.14.82+4.19-rc5-1-1 |
| 14 | kmod-cfg80211 | 4.9.107+2017-11-01-9 | 4.14.82+4.19-rc5-1-1 |
| 15 | kmod-gpio-button-hotplug | 4.9.107-2 | 4.14.82-2 |
| 16 | kmod-ip6tables | 4.9.107-1 | 4.14.82-1 |
| 17 | kmod-ipt-conntrack | 4.9.107-1 | 4.14.82-1 |
| 18 | kmod-ipt-core | 4.9.107-1 | 4.14.82-1 |
| 19 | kmod-ipt-nat | 4.9.107-1 | 4.14.82-1 |
| 20 | kmod-lib-crc-ccitt | 4.9.107-1 | 4.14.82-1 |
| 21 | kmod-mac80211 | 4.9.107+2017-11-01-9 | 4.14.82+4.19-rc5-1-1 |
| 22 | kmod-nf-conntrack | 4.9.107-1 | 4.14.82-1 |
| 23 | kmod-nf-conntrack6 | 4.9.107-1 | 4.14.82-1 |
| 24 | kmod-nf-ipt | 4.9.107-1 | 4.14.82-1 |
| 25 | kmod-nf-ipt6 | 4.9.107-1 | 4.14.82-1 |
| 26 | kmod-nf-nat | 4.9.107-1 | 4.14.82-1 |
| 27 | kmod-nf-reject | 4.9.107-1 | 4.14.82-1 |
| 28 | kmod-nf-reject6 | 4.9.107-1 | 4.14.82-1 |
| 29 | kmod-ppp | 4.9.107-1 | 4.14.82-1 |
| 30 | kmod-pppoe | 4.9.107-1 | 4.14.82-1 |
| 31 | kmod-pppox | 4.9.107-1 | 4.14.82-1 |
| 32 | kmod-slhc | 4.9.107-1 | 4.14.82-1 |
| 33 | libblobmsg-json | 2018-04-12-6eff829d-1 | 2018-07-25-c83a84af-2 |
| 34 | libip4tc | 1.6.2-1 | 1.8.2-2 |
| 35 | libip6tc | 1.6.2-1 | 1.8.2-2 |
| 36 | libiwinfo | 2018-05-18-e59f9253-1 | 2018-07-31-65b8333f-1 |
| 37 | libjson-c | 0.12.1-1 | 0.12.1-2 |
| 38 | libjson-script | 2018-04-12-6eff829d-1 | 2018-07-25-c83a84af-2 |
| 39 | libpthread | 1.1.19-1 | 1.1.20-1 |
| 40 | libubox | 2018-04-12-6eff829d-1 | 2018-07-25-c83a84af-2 |
| 41 | libubus | 2018-01-16-5bae22eb-1 | 2018-10-06-221ce7e7-1 |
| 42 | libuci | 2018-03-24-5d2bf09e-1 | 2018-08-11-4c8b4d6e-1 |
| 43 | libuclient | 2017-11-02-4b87d831-1 | 2018-11-24-3ba74ebc-1 |
| 44 | libxtables | 1.6.2-1 | 1.8.2-2 |
| 45 | luci | git-18.295.70765-c74d9c0-1 | git-18.340.83538-1b26c91-1 |
| 46 | luci-app-firewall | git-18.295.70765-c74d9c0-1 | git-18.340.83538-1b26c91-1 |
| 47 | luci-base | git-18.295.70765-c74d9c0-1 | git-18.340.83538-1b26c91-1 |
| 48 | luci-lib-ip | git-18.295.70765-c74d9c0-1 | git-18.340.83538-1b26c91-1 |
| 49 | luci-lib-jsonc | git-18.295.70765-c74d9c0-1 | git-18.340.83538-1b26c91-1 |
| 50 | luci-lib-nixio | git-18.295.70765-c74d9c0-1 | git-18.340.83538-1b26c91-1 |
| 51 | luci-mod-admin-full | git-18.295.70765-c74d9c0-1 | git-18.340.83538-1b26c91-1 |
| 52 | luci-mod-network | git-18.295.70765-c74d9c0-1 | git-18.340.83538-1b26c91-1 |
| 53 | luci-mod-status | git-18.295.70765-c74d9c0-1 | git-18.340.83538-1b26c91-1 |
| 54 | luci-mod-system | git-18.295.70765-c74d9c0-1 | git-18.340.83538-1b26c91-1 |
| 55 | luci-proto-ipv6 | git-18.295.70765-c74d9c0-1 | git-18.340.83538-1b26c91-1 |
| 56 | luci-proto-ppp | git-18.295.70765-c74d9c0-1 | git-18.340.83538-1b26c91-1 |
| 57 | luci-ssl | git-18.295.70765-c74d9c0-1 | git-18.340.83538-1b26c91-1 |
| 58 | luci-theme-bootstrap | git-18.295.70765-c74d9c0-1 | git-18.340.83538-1b26c91-1 |
| 59 | mtd | 21 | 23 |
| 60 | netifd | 2018-05-30-a580028d-1 | 2018-11-26-dfa4ede4-1 |
| 61 | odhcp6c | 2018-04-29-5316d7f8-12 | 2018-07-14-67ae6a71-16 |
| 62 | odhcpd-ipv6only | 1.7-1 | 1.13-3 |
| 63 | ppp | 2.4.7-12 | 2.4.7-14 |
| 64 | ppp-mod-pppoe | 2.4.7-12 | 2.4.7-14 |
| 65 | procd | 2018-03-28-dfb68f85-1 | 2018-11-23-d6673547-1 |
| 66 | rpcd | 2018-08-16-41333abe-1 | 2018-11-22-c79ef222-1 |
| 67 | uboot-envtools | 2018.03-1 | 2018.03-2 |
| 68 | ubus | 2018-01-16-5bae22eb-1 | 2018-10-06-221ce7e7-1 |
| 69 | ubusd | 2018-01-16-5bae22eb-1 | 2018-10-06-221ce7e7-1 |
| 70 | uci | 2018-03-24-5d2bf09e-1 | 2018-08-11-4c8b4d6e-1 |
| 71 | uclient-fetch | 2017-11-02-4b87d831-1 | 2018-11-24-3ba74ebc-1 |
| 72 | uhttpd | 2018-08-23-b741dec3-1 | 2018-11-28-cdfc902a-1 |
| 73 | wpad-mini | 2018-05-21-62566bc2-4 | 2018-05-21-62566bc2-6 |
+-----+--------------------------+----------------------------+----------------------------+
Proceed with upgrade? (Y/y to proceed) n
Cancelled by user!