Compare commits
No commits in common. "ee7bbcef94ed9d174fb6c5b40b2d4c965b463289" and "4294c03219f6cbc5a1295ebf7c730f8782dafaf5" have entirely different histories.
ee7bbcef94
...
4294c03219
|
@ -31,10 +31,10 @@ function usage() {
|
||||||
|
|
||||||
function run_operation {
|
function run_operation {
|
||||||
options="--flake $flakeDir $remainingArgs --use-remote-sudo --log-format multiline-with-logs"
|
options="--flake $flakeDir $remainingArgs --use-remote-sudo --log-format multiline-with-logs"
|
||||||
|
|
||||||
echo "Running this operation: nixos-rebuild $1 $options"
|
echo "Running this operation: nixos-rebuild $1 $options"
|
||||||
nixos-rebuild $operation $options
|
nixos-rebuild $operation $options
|
||||||
}
|
}
|
||||||
|
|
||||||
# Argument processing logic shamelessly stolen from https://stackoverflow.com/questions/192249/how-do-i-parse-command-line-arguments-in-bash
|
# Argument processing logic shamelessly stolen from https://stackoverflow.com/questions/192249/how-do-i-parse-command-line-arguments-in-bash
|
||||||
POSITIONAL_ARGS=()
|
POSITIONAL_ARGS=()
|
||||||
|
@ -73,7 +73,7 @@ done
|
||||||
remainingArgs=${POSITIONAL_ARGS[@]}
|
remainingArgs=${POSITIONAL_ARGS[@]}
|
||||||
set -- "${POSITIONAL_ARGS[@]}" # restore positional parameters
|
set -- "${POSITIONAL_ARGS[@]}" # restore positional parameters
|
||||||
|
|
||||||
if [ -z "${flakeDir}" ]; then
|
if [ -n "${flakeDir}" ]; then
|
||||||
echo "Flake directory not specified. Use '--flake <path>' or set \$FLAKE_DIR."
|
echo "Flake directory not specified. Use '--flake <path>' or set \$FLAKE_DIR."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue