summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2015-10-04 14:20:39 +0200
committerMatthias Beyer <mail@beyermatthias.de>2015-10-04 14:20:39 +0200
commitf44dc2a8cc70e26b755c2b1278818d422908beb8 (patch)
treee83477c377d018ee6a8013040be56f73f0d45575
parent044005f8f45d9d56ca5477928bf7b0cab8e5768e (diff)
parent17288aec4739a687f552a932d721615da047f157 (diff)
Merge pull request #102 from matthiasbeyer/switch-no_tag_if_build
Do not generate config tag if cmd is "build"
-rwxr-xr-xnix-script-switch.sh11
1 files changed, 10 insertions, 1 deletions
diff --git a/nix-script-switch.sh b/nix-script-switch.sh
index ab73917..b4edfcb 100755
--- a/nix-script-switch.sh
+++ b/nix-script-switch.sh
@@ -58,6 +58,10 @@ usage() {
nix-script -v switch -c switch -w /home/me/config -n
+ This command does not generate a tag in the configuration if
+ the command is "build". A tag in the nixpkgs clone can be
+ generated, though.
+
$(help_rcvars \
"RC_CONFIG - Path of your system configuration (git) directory"\
"RC_NIXPKGS - Path of your nixpkgs clone" \
@@ -203,7 +207,12 @@ then
fi
fi
-__git "$WD" tag $TAG_FLAGS "$TAG_NAME" "$TAG_TARGET"
+if [[ "$COMMAND" =~ "build" ]]
+then
+ stdout "Command is 'build'. Not generating config tag"
+else
+ __git "$WD" tag $TAG_FLAGS "$TAG_NAME" "$TAG_TARGET"
+fi
if [[ $TAG_NIXPKGS -eq 1 ]]
then