cli/default: refactor to use more code from lib

This commit is contained in:
lassulus authored and mergify[bot] committed 2023-07-19 19:07:40 +00:00
1 parent cdaff66b57
commit f6649d69d9
4 files changed
+36 -39

No files matched your search

+3 -3
View File
@@ -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