Commit 514ea180 authored by Robert Hensing's avatar Robert Hensing
Browse files

nixos: Update s-t-c and apply help text

parent 2cf4e112
Loading
Loading
Loading
Loading
+17 −0
Original line number Diff line number Diff line
@@ -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
+2 −5
Original line number Diff line number Diff line
@@ -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);
}
+1 −4
Original line number Diff line number Diff line
@@ -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
    );