zefie icon

opkg-update

zefie | PRO | 08/20/18 09:22:26 AM UTC | 0 ⭐ | 1042 👁️ | Never ⏰ | []
Bash |

370 B

|

None

|

0 👍

/

0 👎

#!/bin/sh
opkg update
 
PACKAGES=$(opkg list-upgradable | cut -d' ' -f1 | sed ':a;N;$!ba;s/\n/ /g')
if [ ! -z "${PACKAGES}" ]; then
    echo "This will upgrade the following packages:"
    echo "${PACKAGES}"
    echo ""
    read -p "Press [Enter] key to start, or [CTRL]-C (^C) to cancel..."
    opkg upgrade ${PACKAGES}
else
    echo "All currently installed packages are up-to-date."
fi

Comments