slim: mark config file as such
[openpandora.oe.git] / recipes / pandora-system / pandora-scripts / op_osupgrade.sh
1 #!/bin/sh
2 zenity --question --title="Update Firmware OS" --text="This little tool helps you to keep your firmware OS up-to-date with the latest tweaks.\n\nPlease note that this is in TESTING state and\nmight break parts of your system with unstable packages!\n\nMake sure your Pandora is connected to the internet and click the Upgrade-Button.\n\n" --ok-label="Upgrade OS" --cancel-label="Quit" || exit 0
3
4 terminal -x bash -c \
5   'echo "Updating package lists..." && \
6    opkg update 2>&1 | tee /tmp/upgrade.log && test ${PIPESTATUS[0]} -eq 0 && \
7    echo "Checking for updated packages..." && \
8    opkg upgrade 2>&1 | tee -a /tmp/upgrade.log && test ${PIPESTATUS[0]} -eq 0 && \
9    touch /tmp/upgrade_ok || sleep 3'
10
11 if test -e /tmp/upgrade_ok; then
12   zenity --info --title="Upgrade complete" \
13     --text "All operations have been finished.\n\nYou can find a logfile at /tmp/upgrade.log"
14 else
15   zenity --error --title="Errors detected" \
16     --text "Errors detected during update.\n\nYou can find a logfile at /tmp/upgrade.log"
17 fi
18 rm -f /tmp/upgrade_ok