summaryrefslogtreecommitdiffstats
path: root/nix-script-switch.sh
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2015-07-27 18:12:13 +0200
committerMatthias Beyer <mail@beyermatthias.de>2015-07-27 18:12:13 +0200
commit1415769217605f12fc481fb8aaef5dba9a69a067 (patch)
tree8c2880042633873501b2f1001e5a8ea1448e6021 /nix-script-switch.sh
parent64ddfa1fdbc793f1b25b20ca7d8be94bdbde88fd (diff)
parent3b3900e1ead3e77bd5bd930e5b1b5b64eff3113d (diff)
Merge pull request #59 from matthiasbeyer/debug-output
Debug output
Diffstat (limited to 'nix-script-switch.sh')
-rwxr-xr-xnix-script-switch.sh13
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"