mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-15 00:54:46 +00:00
23b4356a5f
Fix shebangs and other shell uses in the NixOS tools, allowing them to work correctly on cross-compiled systems.
24 lines
348 B
Bash
24 lines
348 B
Bash
#! @runtimeShell@
|
|
|
|
case "$1" in
|
|
-h|--help)
|
|
exec man nixos-version
|
|
exit 1
|
|
;;
|
|
--hash|--revision)
|
|
if ! [[ @revision@ =~ ^[0-9a-f]+$ ]]; then
|
|
echo "$0: Nixpkgs commit hash is unknown"
|
|
exit 1
|
|
fi
|
|
echo "@revision@"
|
|
;;
|
|
--json)
|
|
cat <<EOF
|
|
@json@
|
|
EOF
|
|
;;
|
|
*)
|
|
echo "@version@ (@codeName@)"
|
|
;;
|
|
esac
|