diff options
author | Aaron LI <aly@aaronly.me> | 2018-03-10 21:17:22 +0800 |
---|---|---|
committer | Aaron LI <aly@aaronly.me> | 2018-03-10 21:17:22 +0800 |
commit | 0939553e448bd3c0e737397c1ed8c41d0cdaba5b (patch) | |
tree | 376a4a8ef7776f2d2c4555e96e89e507ce1a8e13 | |
parent | eab95d09049bbd6a32e2db58649f749a674b1271 (diff) | |
download | dfly-update-0939553e448bd3c0e737397c1ed8c41d0cdaba5b.tar.bz2 |
Add upgrade command
-rwxr-xr-x | dfly-update | 16 |
1 files changed, 15 insertions, 1 deletions
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 ;; |