2012-04-10 22:17:43 +01:00
|
|
|
#! @shell@
|
2014-12-27 20:43:04 +00:00
|
|
|
|
|
|
|
case "$1" in
|
2016-07-13 08:11:32 +01:00
|
|
|
-h|--help)
|
2016-07-12 15:29:13 +01:00
|
|
|
exec man nixos-version
|
|
|
|
exit 1
|
2016-07-13 08:11:32 +01:00
|
|
|
;;
|
2014-12-27 20:43:04 +00:00
|
|
|
--hash|--revision)
|
2017-04-01 01:00:00 +01:00
|
|
|
echo "@revision@"
|
2014-12-27 20:43:04 +00:00
|
|
|
;;
|
2019-09-13 17:58:55 +01:00
|
|
|
--json)
|
|
|
|
cat <<EOF
|
2020-02-10 14:25:24 +00:00
|
|
|
@json@
|
2019-09-13 17:58:55 +01:00
|
|
|
EOF
|
|
|
|
;;
|
2014-12-27 20:43:04 +00:00
|
|
|
*)
|
2017-04-01 01:00:00 +01:00
|
|
|
echo "@version@ (@codeName@)"
|
2014-12-27 20:43:04 +00:00
|
|
|
;;
|
|
|
|
esac
|