mirror of
https://github.com/gtxaspec/wz_mini_hacks.git
synced 2024-11-22 13:37:19 +00:00
add unattended flag to upgrade script
This commit is contained in:
parent
69a2f38644
commit
c0b10e837e
@ -131,15 +131,22 @@ reboot
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if [[ -e /tmp/dbgflag ]]; then
|
if [[ "$1" == "unattended" ]]; then
|
||||||
|
echo "Unattended upgrade!"
|
||||||
|
rm -rf /opt/Upgrade
|
||||||
|
sync
|
||||||
|
setup
|
||||||
|
else
|
||||||
|
|
||||||
|
if [[ -e /tmp/dbgflag ]]; then
|
||||||
upgrade_mode_start
|
upgrade_mode_start
|
||||||
else
|
else
|
||||||
|
|
||||||
if [ "$1" == "backup_begin" ]; then
|
if [ "$1" == "backup_begin" ]; then
|
||||||
backup_begin
|
backup_begin
|
||||||
else
|
else
|
||||||
|
|
||||||
read -r -p "${1:-wz_mini, this will download the latest version from github and upgrade your system. Are you sure? [y/N]} " response
|
read -r -p "${1:-wz_mini, this will download the latest version from github and upgrade your system. Are you sure? [y/N]} " response
|
||||||
case "$response" in
|
case "$response" in
|
||||||
[yY][eE][sS]|[yY])
|
[yY][eE][sS]|[yY])
|
||||||
if [[ -d /opt/Upgrade ]]; then
|
if [[ -d /opt/Upgrade ]]; then
|
||||||
@ -158,12 +165,11 @@ read -r -p "${1:-wz_mini, this will download the latest version from github and
|
|||||||
else
|
else
|
||||||
setup
|
setup
|
||||||
fi
|
fi
|
||||||
|
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "User declined system update, exit"
|
echo "User declined system update, exit"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user