Skip to content

Commit 8e4a684

Browse files
committed
src/nixos-anywhere.sh: add shebang
It's not strictly needed because Nix wraps it with writeShellApplication, but it makes it easier for the script to be standalone and use the right syntax highlighter in shells. Invoke it with bash in the README because of the Nix build sandbox missing /usr/bin/env
1 parent 44e8a43 commit 8e4a684

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ nix run github:numtide/nixos-anywhere -- root@yourip --flake github:your-user/yo
4646
The parameter passed to `--flake` should point to your nixos configuration
4747
exposed in your flake (`nixosConfigurations.your-system` in the example above).
4848

49-
<!-- `$ ./src/nixos-anywhere.sh --help` -->
49+
<!-- `$ bash ./src/nixos-anywhere.sh --help` -->
5050
```
5151
Usage: nixos-anywhere [options] ssh-host
5252

src/nixos-anywhere.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
14
showUsage() {
25
cat <<USAGE
36
Usage: nixos-anywhere [options] ssh-host

0 commit comments

Comments
 (0)