mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-14 08:34:50 +00:00
20 lines
334 B
Bash
20 lines
334 B
Bash
#! @shell@
|
|
|
|
case "$1" in
|
|
-h|--help)
|
|
exec man nixos-version
|
|
exit 1
|
|
;;
|
|
--hash|--revision)
|
|
echo "@revision@"
|
|
;;
|
|
--json)
|
|
cat <<EOF
|
|
{"nixosVersion": "@version@", "nixpkgsRevision": "@revision@", "configurationRevision": "@configurationRevision@"}
|
|
EOF
|
|
;;
|
|
*)
|
|
echo "@version@ (@codeName@)"
|
|
;;
|
|
esac
|