mirror of
https://github.com/torproject/lego.git
synced 2024-11-26 19:20:22 +00:00
Fix the download script for real this time
This commit is contained in:
parent
c51ac4f0c1
commit
a8e5b3dd7f
@ -7,12 +7,12 @@ set -e
|
||||
# change to the desired release tag and sha256 checksum
|
||||
# <https://github.com/sass/dart-sass/releases/>
|
||||
dart_release_tag=${dart_release_tag:-1.56.1}
|
||||
dart_tarball_checksum=${dart_tarball_checksum:-e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855}
|
||||
dart_tarball_checksum=${dart_tarball_checksum:-a5cf9e1f5db9456faffa440779a21a49cee65755c21617b75d1367d11448c59b}
|
||||
|
||||
dart_tarball_filename=dart-sass-"$dart_release_tag"-linux-x64.tar.gz
|
||||
dart_tarball_url=https://github.com/sass/dart-sass/releases/download/"$dart_release_tag"/"$dart_tarball_filename"
|
||||
|
||||
curl -s -o "$dart_tarball_filename" "$dart_tarball_url"
|
||||
curl -sSL -o "$dart_tarball_filename" "$dart_tarball_url"
|
||||
|
||||
if ! sha256sum -c <(echo "$dart_tarball_checksum $dart_tarball_filename"); then
|
||||
echo "bad checksum for $dart_tarball_filename"
|
||||
@ -23,9 +23,12 @@ fi
|
||||
user_bin_dir=$HOME/.local/bin
|
||||
|
||||
mkdir -p "$user_bin_dir"
|
||||
tar -x -f "$dart_tarball_filename" -C "$user_bin_dir" dart-sass/sass
|
||||
|
||||
rm -r "$dart_tarball_filename" dart-sass
|
||||
tempdir=$(mktemp -d)
|
||||
|
||||
tar -x -f "$dart_tarball_filename" -C "$tempdir" dart-sass/sass
|
||||
mv "$tempdir"/dart-sass/sass "$user_bin_dir"
|
||||
rm -r "$tempdir" "$dart_tarball_filename"
|
||||
|
||||
echo "sass was successfully installed! make sure $user_bin_dir is in your PATH"
|
||||
echo "run this command to add it to your path now:"
|
||||
|
Loading…
Reference in New Issue
Block a user