@@ -1,4 +1,5 @@
11#! @runtimeShell@ -e
2+# shellcheck shell=bash
23
34# Shows the usage of this command to the user
45
@@ -29,12 +30,12 @@ while [ $# -gt 0 ]; do
2930 nixBuildArgs+=("--option" "$1" "$2"); shift
3031 ;;
3132 *)
32− if [ ! -z "$networkExpr" ]; then
33+ if [ -n "$networkExpr" ]; then
3334 echo "Network expression already set!"
3435 showUsage
3536 exit 1
3637 fi
37− networkExpr="$(readlink -f $1)"
38+ networkExpr="$(readlink -f "$1")"
3839 ;;
3940 esac
4041
@@ -49,4 +50,4 @@ fi
4950
5051# Build a network of VMs
5152nix-build '<nixpkgs/nixos/modules/installer/tools/nixos-build-vms/build-vms.nix>' \
52− --argstr networkExpr $networkExpr "${nixBuildArgs[@]}"
53+ --argstr networkExpr "$networkExpr" "${nixBuildArgs[@]}"