diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2015-07-15 21:51:23 +0200 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2015-07-15 21:51:23 +0200 |
commit | 1cd8d5c7f9ed7c99252ff4e7df78cdb67e9fac73 (patch) | |
tree | 1650b835b2ff4a9697a90777842ddd6e8a3f5d00 | |
parent | 98d15fbbfafe932ace3d6bb13bc7775f33c31105 (diff) | |
parent | 817ff1bb38fe0701b635d98e9be0e223f7db3773 (diff) |
Merge pull request #64 from matthiasbeyer/switch-include_hostname_per_default
Do include the hostname as default, but disable with -n
-rwxr-xr-x | nix-script-switch.sh | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/nix-script-switch.sh b/nix-script-switch.sh index 70a9b67..f2cc01f 100755 --- a/nix-script-switch.sh +++ b/nix-script-switch.sh @@ -13,7 +13,7 @@ usage() { -c <command> Command for nixos-rebuild. See 'man nixos-rebuild' -w <path> Path to your configuration git directory - -n Include hostname in tag name + -n DON'T include hostname in tag name -h Show this help and exit This command helps you rebuilding your system and keeping track @@ -47,7 +47,7 @@ COMMAND= ARGS= WD= TAG_NAME= -HOSTNAME="" +HOSTNAME="$(hostname)" while getopts "c:w:t:nh" OPTION do @@ -66,8 +66,8 @@ do ;; n) - HOSTNAME=$(hostname) - stdout "HOSTNAME = $HOSTNAME" + HOSTNAME="" + stdout "HOSTNAME disabled" ;; h) |