summaryrefslogtreecommitdiffstats
path: root/nix-script-show-generation.sh
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2015-06-28 15:52:39 +0200
committerMatthias Beyer <mail@beyermatthias.de>2015-07-05 16:42:46 +0200
commit997abf3fd1b0e3618f7676ed40b4f8dc83d296ee (patch)
tree79451d41299bb25ac3ce8aa3345dae9cc476b679 /nix-script-show-generation.sh
parent453dd47ab53c0a7160b08e5ae85bf813130d2539 (diff)
Minify code in show-generation command
Diffstat (limited to 'nix-script-show-generation.sh')
-rwxr-xr-xnix-script-show-generation.sh7
1 files changed, 1 insertions, 6 deletions
diff --git a/nix-script-show-generation.sh b/nix-script-show-generation.sh
index b08ba83..5924846 100755
--- a/nix-script-show-generation.sh
+++ b/nix-script-show-generation.sh
@@ -38,12 +38,7 @@ do
esac
done
-if [[ $SYSTEM -eq 1 ]]
-then
- current_system_generation
-else
- current_user_generation
-fi
+([[ $SYSTEM -eq 1 ]] && current_system_generation) || current_user_generation
stdout "Ready"