diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2015-07-27 18:12:13 +0200 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2015-07-27 18:12:13 +0200 |
commit | 1415769217605f12fc481fb8aaef5dba9a69a067 (patch) | |
tree | 8c2880042633873501b2f1001e5a8ea1448e6021 /nix-script-switch.sh | |
parent | 64ddfa1fdbc793f1b25b20ca7d8be94bdbde88fd (diff) | |
parent | 3b3900e1ead3e77bd5bd930e5b1b5b64eff3113d (diff) |
Merge pull request #59 from matthiasbeyer/debug-output
Debug output
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" |