mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 15:03:28 +00:00
nixos: Update s-t-c and apply help text
This commit is contained in:
parent
2cf4e112a8
commit
514ea18006
@ -28,6 +28,23 @@ die() {
|
||||
exit 1
|
||||
}
|
||||
|
||||
usage() {
|
||||
log "NixOS apply invocation error: $*"
|
||||
cat >&2 <<EOF
|
||||
Usage: apply [switch|boot|test|dry-activate] [OPTIONS]
|
||||
Subcommands:
|
||||
switch make the configuration the boot default and activate it
|
||||
boot make the configuration the boot default
|
||||
test activate the configuration, but don\'t make it the boot default
|
||||
dry-activate show what would be done if this configuration were activated
|
||||
Options:
|
||||
--install-bootloader install the bootloader
|
||||
--profile PROFILE use PROFILE as the target profile (if applicable)
|
||||
--specialisation NAME use the specialisation NAME
|
||||
EOF
|
||||
}
|
||||
|
||||
|
||||
parse_args() {
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case "$1" in
|
||||
|
@ -80,12 +80,9 @@ if ("@localeArchive@" ne "") {
|
||||
|
||||
if (!defined($action) || ($action ne "switch" && $action ne "boot" && $action ne "test" && $action ne "dry-activate")) {
|
||||
print STDERR <<"EOF";
|
||||
error: Unknown action $action
|
||||
Usage: $0 [switch|boot|test|dry-activate]
|
||||
|
||||
switch: make the configuration the boot default and activate now
|
||||
boot: make the configuration the boot default
|
||||
test: activate the configuration, but don\'t make it the boot default
|
||||
dry-activate: show what would be done if this configuration were activated
|
||||
Consider calling `apply` instead of `switch-to-configuration`.
|
||||
EOF
|
||||
exit(1);
|
||||
}
|
||||
|
@ -940,10 +940,7 @@ fn do_user_switch(parent_exe: String) -> anyhow::Result<()> {
|
||||
fn usage(argv0: &str) -> ! {
|
||||
eprintln!(
|
||||
r#"Usage: {} [switch|boot|test|dry-activate]
|
||||
switch: make the configuration the boot default and activate now
|
||||
boot: make the configuration the boot default
|
||||
test: activate the configuration, but don't make it the boot default
|
||||
dry-activate: show what would be done if this configuration were activated
|
||||
Consider calling `apply` instead of `switch-to-configuration`.
|
||||
"#,
|
||||
argv0
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user