* Better checking.
svn path=/nixos/trunk/; revision=7854
This commit is contained in:
parent
08ad51690d
commit
5d0f7bdadd
@ -4,7 +4,7 @@
|
|||||||
# What are we supposed to do?
|
# What are we supposed to do?
|
||||||
action="$1"
|
action="$1"
|
||||||
|
|
||||||
if test -z "$action"; then
|
showSyntax() {
|
||||||
# !!! more or less cut&paste from
|
# !!! more or less cut&paste from
|
||||||
# system/switch-to-configuration.sh (which we call, of course).
|
# system/switch-to-configuration.sh (which we call, of course).
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
@ -17,7 +17,9 @@ build: build the configuration, but don't make it the default or
|
|||||||
activate it
|
activate it
|
||||||
EOF
|
EOF
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
}
|
||||||
|
|
||||||
|
if test -z "$action"; then showSyntax; fi
|
||||||
|
|
||||||
|
|
||||||
# Allow the location of NixOS sources and the system configuration
|
# Allow the location of NixOS sources and the system configuration
|
||||||
@ -34,11 +36,13 @@ if test "$action" = "switch" -o "$action" = "boot"; then
|
|||||||
--arg configuration "import $NIXOS_CONFIG" \
|
--arg configuration "import $NIXOS_CONFIG" \
|
||||||
--set -A system
|
--set -A system
|
||||||
pathToConfig=/nix/var/nix/profiles/system
|
pathToConfig=/nix/var/nix/profiles/system
|
||||||
else
|
elif test "$action" = "test" -o "$action" = "build"; then
|
||||||
nix-build $NIXOS/system/system.nix \
|
nix-build $NIXOS/system/system.nix \
|
||||||
--arg configuration "import $NIXOS_CONFIG" \
|
--arg configuration "import $NIXOS_CONFIG" \
|
||||||
-A system -K -k
|
-A system -K -k
|
||||||
pathToConfig=./result
|
pathToConfig=./result
|
||||||
|
else
|
||||||
|
showSyntax
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user