Advertisement
zefie

opkg-update

Aug 20th, 2018
386
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/sh
  2. opkg update
  3.  
  4. PACKAGES=$(opkg list-upgradable | cut -d' ' -f1 | sed ':a;N;$!ba;s/\n/ /g')
  5. if [ ! -z "${PACKAGES}" ]; then
  6.     echo "This will upgrade the following packages:"
  7.     echo "${PACKAGES}"
  8.     echo ""
  9.     read -p "Press [Enter] key to start, or [CTRL]-C (^C) to cancel..."
  10.     opkg upgrade ${PACKAGES}
  11. else
  12.     echo "All currently installed packages are up-to-date."
  13. fi
Advertisement
RAW Paste Data Copied
Advertisement