diff options
Diffstat (limited to 'nixos/modules/installer/tools/nixos-version.sh')
-rw-r--r-- | nixos/modules/installer/tools/nixos-version.sh | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/nixos/modules/installer/tools/nixos-version.sh b/nixos/modules/installer/tools/nixos-version.sh index 5dbf277fe4c..51aa2dd8232 100644 --- a/nixos/modules/installer/tools/nixos-version.sh +++ b/nixos/modules/installer/tools/nixos-version.sh @@ -1,2 +1,10 @@ #! @shell@ -echo "@nixosVersion@ (@nixosCodeName@)" + +case "$1" in + --hash|--revision) + echo "@nixosRevision@" + ;; + *) + echo "@nixosVersion@ (@nixosCodeName@)" + ;; +esac |