summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xnix-script-switch.sh6
1 files changed, 2 insertions, 4 deletions
diff --git a/nix-script-switch.sh b/nix-script-switch.sh
index 91ca766..19291a0 100755
--- a/nix-script-switch.sh
+++ b/nix-script-switch.sh
@@ -145,11 +145,9 @@ dbg "ARGS = $ARGS"
# Function to generate the tag at $NIXPKGS as well
#
tag_nixpkgs() {
- if [[ ! -d "$1" ]]
- then
- stderr "'$1' is not a directory, so can't be a nixpkgs clone"
+ [[ ! -d "$1" ]] && \
+ stderr "'$1' is not a directory, so can't be a nixpkgs clone" && \
return
- fi
commit=$(nixos-version | cut -d . -f 3 | cut -d " " -f 1)