419bc0a4cd
In87a19e9048
I merged staging-next into master using the GitHub gui as intended. Inac241fb7a5
I merged master into staging-next for the next staging cycle, however, I accidentally pushed it to master. Thinking this may cause trouble, I reverted it in0be87c7979
. This was however wrong, as it "removed" master. This reverts commit0be87c7979
.
33 lines
757 B
Bash
Executable file
33 lines
757 B
Bash
Executable file
#!/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
|
|
)
|
|
|
|
hashfile="$(nix-prefetch-url --print-path "https://github.com/electron/electron/releases/download/v${VERSION}/SHASUMS256.txt" 2>/dev/null | tail -n1)"
|
|
|
|
echo "Entry similar to the following goes in default.nix:"
|
|
echo
|
|
echo " electron_${VERSION%%.*} = mkElectron \"${VERSION}\" {"
|
|
|
|
for S in "${!SYSTEMS[@]}"; do
|
|
hash="$(grep " *electron-v${VERSION}-${SYSTEMS[$S]}.zip$" "$hashfile"|cut -f1 -d' ')"
|
|
echo " $S = \"$hash\";"
|
|
done
|
|
|
|
echo " };"
|