mirror of
https://github.com/nix-community/disko.git
synced 2026-12-01 21:43:29 +01:00
cli/default: refactor to use more code from lib
This commit is contained in:
1 parent
cdaff66b57
commit
f6649d69d9
4 files changed
+36
-39
No files matched your search
@@ -18,7 +18,7 @@ or $0 [options] --flake github:somebody/somewhere
|
||||
Options:
|
||||
|
||||
* -m, --mode mode
|
||||
set the mode, either create, mount, zap_create_mount or disko
|
||||
set the mode, either format, mount or disko
|
||||
* -f, --flake uri
|
||||
fetch the disko config relative to this flake's root
|
||||
* --arg name value
|
||||
@@ -93,8 +93,8 @@ while [[ $# -gt 0 ]]; do
|
||||
shift
|
||||
done
|
||||
|
||||
if ! { [[ $mode = "create" ]] || [[ $mode = "mount" ]] || [[ $mode = "zap_create_mount" ]] || [[ $mode = "disko" ]]; }; then
|
||||
abort "mode must be either create, mount, zap_create_mount or disko"
|
||||
if ! { [[ $mode = "format" ]] || [[ $mode = "mount" ]] || [[ $mode = "disko" ]] || [[ $mode = "create" ]] || [[ $mode = "zap_create_mount" ]] ; }; then
|
||||
abort "mode must be either format, mount or disko"
|
||||
fi
|
||||
|
||||
if [[ -n "${flake+x}" ]]; then
|
||||
|
||||
Reference in new issue
Block a user