2019-01-09 07:20:37 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
set -eu -o pipefail
|
|
|
|
|
|
|
|
if [[ $# -lt 1 ]]; then
|
|
|
|
echo "$0: version" >&2
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
VERSION=$1
|
|
|
|
|
|
|
|
declare -A SYSTEMS HASHES
|
|
|
|
SYSTEMS=(
|
|
|
|
[i686-linux]=linux-ia32
|
|
|
|
[x86_64-linux]=linux-x64
|
|
|
|
[armv7l-linux]=linux-armv7l
|
|
|
|
[aarch64-linux]=linux-arm64
|
|
|
|
[x86_64-darwin]=darwin-x64
|
|
|
|
)
|
|
|
|
|
|
|
|
for S in "${!SYSTEMS[@]}"; do
|
2020-02-05 18:18:11 +00:00
|
|
|
HASHES["$S"]=$(nix-prefetch-url "https://github.com/electron/electron/releases/download/v${VERSION}/electron-v${VERSION}-${SYSTEMS[$S]}.zip")
|
2019-01-09 07:20:37 +00:00
|
|
|
done
|
|
|
|
|
2020-02-05 18:18:11 +00:00
|
|
|
for S in "${!HASHES[@]}"; do
|
|
|
|
echo "$S"
|
|
|
|
echo "sha256 = \"${HASHES[$S]}\";"
|
|
|
|
done
|