From 0939553e448bd3c0e737397c1ed8c41d0cdaba5b Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Sat, 10 Mar 2018 21:17:22 +0800 Subject: Add upgrade command --- dfly-update | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/dfly-update b/dfly-update index 5d75acf..6177aa2 100755 --- a/dfly-update +++ b/dfly-update @@ -532,6 +532,8 @@ Usage: Mount the given image file backup Back up the current kernel and world + upgrade + Install the new kernel, world, and config files _EOF_ echo cmd_version @@ -601,7 +603,7 @@ cmd_mount() { local filepath="$1" case "${filepath}" in *.bz2) - echo -n "Decompressing file: ${filepath} ..." + echo -n "Decompressing file: ${filepath} ... " bunzip2 "${filepath}" echo "DONE" filepath="${filepath%.bz2}" @@ -619,6 +621,14 @@ cmd_backup() { backup_world "${backfile}" } +# Install the new kernel, world, and config files. +cmd_upgrade() { + [ $# -eq 0 ] || \ + error ${EC_ARGS} "cmd_upgrade: invalid arguments: $@" + install_system + upgrade_system +} + # # Main @@ -649,6 +659,10 @@ case "${COMMAND}" in shift cmd_backup ;; + upgrade) + shift + cmd_upgrade + ;; help|--help|-h|*) cmd_usage ;; -- cgit v1.2.2