mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-25 07:16:17 +02:00
Merge pull request #5096 from AnatoleLucet/patch-1
Remove curl deps in install script
This commit is contained in:
commit
0b6bff5455
1 changed files with 9 additions and 2 deletions
|
@ -76,14 +76,21 @@ fi
|
||||||
|
|
||||||
tarball=$tmpDir/nix-@nixVersion@-$system.tar.xz
|
tarball=$tmpDir/nix-@nixVersion@-$system.tar.xz
|
||||||
|
|
||||||
require_util curl "download the binary tarball"
|
|
||||||
require_util tar "unpack the binary tarball"
|
require_util tar "unpack the binary tarball"
|
||||||
if [ "$(uname -s)" != "Darwin" ]; then
|
if [ "$(uname -s)" != "Darwin" ]; then
|
||||||
require_util xz "unpack the binary tarball"
|
require_util xz "unpack the binary tarball"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if command -v wget > /dev/null 2>&1; then
|
||||||
|
fetch() { wget "$1" -O "$2"; }
|
||||||
|
elif command -v curl > /dev/null 2>&1; then
|
||||||
|
fetch() { curl -L "$1" -o "$2"; }
|
||||||
|
else
|
||||||
|
oops "you don't have wget or curl installed, which I need to download the binary tarball"
|
||||||
|
fi
|
||||||
|
|
||||||
echo "downloading Nix @nixVersion@ binary tarball for $system from '$url' to '$tmpDir'..."
|
echo "downloading Nix @nixVersion@ binary tarball for $system from '$url' to '$tmpDir'..."
|
||||||
curl -L "$url" -o "$tarball" || oops "failed to download '$url'"
|
fetch "$url" "$tarball" || oops "failed to download '$url'"
|
||||||
|
|
||||||
if command -v sha256sum > /dev/null 2>&1; then
|
if command -v sha256sum > /dev/null 2>&1; then
|
||||||
hash2="$(sha256sum -b "$tarball" | cut -c1-64)"
|
hash2="$(sha256sum -b "$tarball" | cut -c1-64)"
|
||||||
|
|
Loading…
Reference in a new issue