mirror of
https://github.com/nix-community/disko.git
synced 2026-11-30 21:13:28 +01:00
fix: add package build and fix disko
This commit is contained in:
1 parent
f82656afbd
commit
2a59af78a8
3 files changed
+34
-2
No files matched your search
@@ -1,9 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
set -x
|
||||
|
||||
readonly libexec_dir="${0%/*}"
|
||||
|
||||
# a file with the disko config
|
||||
declare disko_config
|
||||
|
||||
# mount was chosen as the default mode because it's less destructive
|
||||
mode=mount
|
||||
nix_args=()
|
||||
@@ -30,6 +32,11 @@ abort() {
|
||||
|
||||
## Main ##
|
||||
|
||||
[[ $# -eq 0 ]] && {
|
||||
showUsage
|
||||
exit 1
|
||||
}
|
||||
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case "$1" in
|
||||
-m | --mode)
|
||||
@@ -46,10 +53,11 @@ while [[ $# -gt 0 ]]; do
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
if [ -z ${disko_config+x} ] && [ -e $1 ]; then
|
||||
if [ -z ${disko_config+x} ] && [ -e "$1" ]; then
|
||||
disko_config=$1
|
||||
else
|
||||
showUsage
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
Reference in new issue
Block a user