Skip to content
Snippets Groups Projects
Unverified Commit ea41838a authored by Graham Christensen (Target)'s avatar Graham Christensen (Target) Committed by GitHub
Browse files

install script: remove unportable command check, fixup errant escape

`which` isn't necessarily portable, but `command -v` is an equivalent form.

Additionally, the `\'` is not necessary, as it is already quoted by `"`.
parent 9617a043
No related branches found
No related tags found
No related merge requests found
......@@ -11,14 +11,14 @@ oops() {
}
tmpDir="$(mktemp -d -t nix-binary-tarball-unpack.XXXXXXXXXX || \
oops "Can\'t create temporary directory for downloading the Nix binary tarball")"
oops "Can't create temporary directory for downloading the Nix binary tarball")"
cleanup() {
rm -rf "$tmpDir"
}
trap cleanup EXIT INT QUIT TERM
require_util() {
type "$1" > /dev/null 2>&1 || which "$1" > /dev/null 2>&1 ||
type "$1" > /dev/null 2>&1 || command -v "$1" > /dev/null 2>&1 ||
oops "you do not have '$1' installed, which I need to $2"
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment