Merge pull request #147456 from l0b0/de-lint-installer-scripts
This commit is contained in:
commit
8efe977574
4 changed files with 7 additions and 3 deletions
|
@ -1,4 +1,5 @@
|
||||||
#! @runtimeShell@ -e
|
#! @runtimeShell@ -e
|
||||||
|
# shellcheck shell=bash
|
||||||
|
|
||||||
# Shows the usage of this command to the user
|
# Shows the usage of this command to the user
|
||||||
|
|
||||||
|
@ -29,12 +30,12 @@ while [ $# -gt 0 ]; do
|
||||||
nixBuildArgs+=("--option" "$1" "$2"); shift
|
nixBuildArgs+=("--option" "$1" "$2"); shift
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
if [ ! -z "$networkExpr" ]; then
|
if [ -n "$networkExpr" ]; then
|
||||||
echo "Network expression already set!"
|
echo "Network expression already set!"
|
||||||
showUsage
|
showUsage
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
networkExpr="$(readlink -f $1)"
|
networkExpr="$(readlink -f "$1")"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
@ -49,4 +50,4 @@ fi
|
||||||
|
|
||||||
# Build a network of VMs
|
# Build a network of VMs
|
||||||
nix-build '<nixpkgs/nixos/modules/installer/tools/nixos-build-vms/build-vms.nix>' \
|
nix-build '<nixpkgs/nixos/modules/installer/tools/nixos-build-vms/build-vms.nix>' \
|
||||||
--argstr networkExpr $networkExpr "${nixBuildArgs[@]}"
|
--argstr networkExpr "$networkExpr" "${nixBuildArgs[@]}"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#! @runtimeShell@
|
#! @runtimeShell@
|
||||||
|
# shellcheck shell=bash
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#! @runtimeShell@
|
#! @runtimeShell@
|
||||||
|
# shellcheck shell=bash
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
shopt -s nullglob
|
shopt -s nullglob
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#! @runtimeShell@
|
#! @runtimeShell@
|
||||||
|
# shellcheck shell=bash
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
-h|--help)
|
-h|--help)
|
||||||
|
|
Loading…
Reference in a new issue