diff options
Diffstat (limited to 'nix-script-switch.sh')
-rwxr-xr-x | nix-script-switch.sh | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/nix-script-switch.sh b/nix-script-switch.sh index 0fa5bd7..e2b0502 100755 --- a/nix-script-switch.sh +++ b/nix-script-switch.sh @@ -55,20 +55,20 @@ do case $OPTION in c) COMMAND=$OPTARG - stdout "COMMAND = $COMMAND" + dbg "COMMAND = $COMMAND" ;; w) WD=$OPTARG - stdout "WD = $WD" + dbg "WD = $WD" ;; t) TAG_NAME=$OPTARG - stdout "TAG_NAME = $TAG_NAME" + dbg "TAG_NAME = $TAG_NAME" ;; n) HOSTNAME="" - stdout "HOSTNAME disabled" + dbg "HOSTNAME disabled" ;; h) @@ -79,7 +79,7 @@ do done ARGS=$(echo $* | sed -r 's/(.*)(\-\-(.*)|$)/\2/') -stdout "ARGS = $ARGS" +dbg "ARGS = $ARGS" [[ -z "$WD" ]] && \ stderr "No configuration git directory." && \ @@ -96,6 +96,9 @@ then LASTGEN=$(current_system_generation) sudo -k + stdout "sudo -k succeeded" + stdout "Last generation was: $LASTGEN" + if [[ -z "$TAG_NAME" ]] then if [[ -z "$HOSTNAME" ]]; then TAG_NAME="nixos-$LASTGEN-$COMMAND" |