diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2015-09-25 13:05:31 +0200 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2015-10-04 14:08:59 +0200 |
commit | 97e0b45e1539118dbcc7964ba006377ad313a6ce (patch) | |
tree | f88e6f0e5bcc390c521360c9a35d7a487dc0c763 | |
parent | 1a6ab7a101b6ee73a569c4790bbcd5ae4b655ea6 (diff) |
Minify if
-rwxr-xr-x | nix-script-switch.sh | 6 |
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) |