openwrt/upgrade_opkg.sh

16 lines
433 B
Bash

#!/bin/bash
opkg update
echo "############################################################################"
opkg list-upgradable
echo "############################################################################"
echo
echo "Upgrade ? [Y/n]"
read a
if [[ $a == "Y" ]]; then
echo "Upgrade in progress ..."
opkg list-upgradable | sed -e "s/\s.*//" | while read PKG_NAME; do opkg upgrade "${PKG_NAME}"; done
fi