From 36d0006bf8c73cc4badfef969e42cb94407454c1 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Sat, 11 Jul 2015 15:13:10 +0200 Subject: switch: Remove -g flag support --- nix-script-switch.sh | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'nix-script-switch.sh') diff --git a/nix-script-switch.sh b/nix-script-switch.sh index 9339cb7..70a9b67 100755 --- a/nix-script-switch.sh +++ b/nix-script-switch.sh @@ -9,10 +9,9 @@ COMMAND="switch" usage() { cat <] [-g ] -w [-- args...]") + $(help_synopsis "${BASH_SOURCE[0]}" "[-h] [-c ] -w [-- args...]") -c Command for nixos-rebuild. See 'man nixos-rebuild' - -g Alternative git commit, defaults to 'tag -a' -w Path to your configuration git directory -n Include hostname in tag name -h Show this help and exit @@ -48,7 +47,6 @@ COMMAND= ARGS= WD= TAG_NAME= -GIT_COMMAND= HOSTNAME="" while getopts "c:w:t:nh" OPTION @@ -67,11 +65,6 @@ do stdout "TAG_NAME = $TAG_NAME" ;; - g) - GIT_COMMAND=$OPTARG - stdout "GIT_COMMAND = $GIT_COMMAND" - ;; - n) HOSTNAME=$(hostname) stdout "HOSTNAME = $HOSTNAME" @@ -93,7 +86,6 @@ stdout "ARGS = $ARGS" [[ ! -d "$WD" ]] && stderr "No directory: $WD" && exit 1 [[ -z "$COMMAND" ]] && COMMAND="switch" -[[ -z "$GIT_COMMAND" ]] && GIT_COMMAND="tag -a" explain sudo nixos-rebuild $COMMAND $ARGS REBUILD_EXIT=$? @@ -110,7 +102,7 @@ then fi fi - __git "$WD" $GIT_COMMAND "$TAG_NAME" + __git "$WD" tag -a "$TAG_NAME" else stderr "Switching failed. Won't executing any further commands." -- cgit v1.2.3