mirror of
https://github.com/TECHNOFAB11/disko.git
synced 2025-12-13 00:20:05 +01:00
fix: add package build and fix disko
This commit is contained in:
parent
f82656afbd
commit
2a59af78a8
3 changed files with 34 additions and 2 deletions
12
disko
12
disko
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue