rename var format to format_path

Just for consistency's sake
This commit is contained in:
zimbatm 2019-08-19 15:58:28 +02:00
parent 20d40bf692
commit b050b7651b
No known key found for this signature in database
GPG Key ID: 71BAF6D40C1D63D7

View File

@ -6,7 +6,7 @@ set -euo pipefail
libexec_dir="${0%/*}" libexec_dir="${0%/*}"
configuration=${NIXOS_CONFIG:-$libexec_dir/configuration.nix} configuration=${NIXOS_CONFIG:-$libexec_dir/configuration.nix}
format= format_path=
format_dir=$libexec_dir/formats format_dir=$libexec_dir/formats
target_system= target_system=
cores= cores=
@ -57,11 +57,11 @@ while [[ $# -gt 0 ]]; do
shift shift
;; ;;
-f | --format) -f | --format)
format=$format_dir/$2.nix format_path=$format_dir/$2.nix
shift shift
;; ;;
--format-path) --format-path)
format=$2 format_path=$2
shift shift
;; ;;
--help) --help)
@ -75,8 +75,8 @@ while [[ $# -gt 0 ]]; do
--run) --run)
run=1 run=1
# default to the VM format # default to the VM format
if [[ -z $format ]]; then if [[ -z $format_path ]]; then
format=$format_dir/vm.nix format_path=$format_dir/vm.nix
fi fi
;; ;;
--system) --system)
@ -90,14 +90,14 @@ while [[ $# -gt 0 ]]; do
shift shift
done done
if [[ -z $format ]]; then if [[ -z $format_path ]]; then
abort "missing format. use --help for more details" abort "missing format. use --help for more details"
fi fi
args=( args=(
"$libexec_dir/nixos-generate.nix" "$libexec_dir/nixos-generate.nix"
-I "nixos-config=$configuration" -I "nixos-config=$configuration"
-I "format-config=$format" -I "format-config=$format_path"
) )
if [[ -n $target_system ]]; then if [[ -n $target_system ]]; then