ngrok2: cleanup update.sh
This commit is contained in:
parent
b1bfe7b478
commit
d394fa0d96
@ -4,10 +4,8 @@
|
||||
#!nix-shell -i bash
|
||||
|
||||
set -eu -o pipefail
|
||||
cd "$(dirname "${BASH_SOURCE[0]}")"
|
||||
|
||||
get_download_info() {
|
||||
echo '{ "sys": "'"$1-$2"'", "response": '
|
||||
http --body \
|
||||
https://update.equinox.io/check \
|
||||
'Accept:application/json; q=1; version=1; charset=utf-8' \
|
||||
@ -16,25 +14,20 @@ get_download_info() {
|
||||
channel=stable \
|
||||
os=$1 \
|
||||
goarm= \
|
||||
arch=$2
|
||||
|
||||
# target_version=2.2.8 \
|
||||
|
||||
echo "}"
|
||||
arch=$2 \
|
||||
| jq --arg sys "$1-$2" '{
|
||||
sys: $sys,
|
||||
url: .download_url,
|
||||
sha256: .checksum,
|
||||
version: .release.version
|
||||
}'
|
||||
}
|
||||
|
||||
(
|
||||
echo "["
|
||||
get_download_info linux 386
|
||||
echo ","
|
||||
get_download_info linux amd64
|
||||
echo ","
|
||||
get_download_info linux arm
|
||||
echo ","
|
||||
get_download_info linux arm64
|
||||
# echo ","
|
||||
# get_download_info darwin 386
|
||||
echo ","
|
||||
get_download_info darwin amd64
|
||||
echo "]"
|
||||
) | jq 'map ({ (.sys): { "sys": .sys, "url": .response.download_url, "sha256": .response.checksum, "version": .response.release.version } }) | add' >versions.json
|
||||
) | jq --slurp 'map ({ (.sys): . }) | add' \
|
||||
> pkgs/tools/networking/ngrok-2/versions.json
|
||||
|
Loading…
Reference in New Issue
Block a user