1 | #!/usr/bin/env bash |
2 | # |
3 | # Usage: |
4 | # test/nix.sh <function name> |
5 | |
6 | set -o nounset |
7 | set -o pipefail |
8 | set -o errexit |
9 | |
10 | # This is a 66-line bootstrap script. |
11 | download() { |
12 | wget --directory _tmp https://nixos.org/nix/install |
13 | chmod +x _tmp/install |
14 | } |
15 | |
16 | # Usage: . test/nix.sh env |
17 | env() { |
18 | set +o nounset |
19 | set +o pipefail |
20 | set +o errexit |
21 | . /home/andy/.nix-profile/etc/profile.d/nix.sh |
22 | } |
23 | |
24 | "$@" |