2022-10-21 18:38:19 +00:00
|
|
|
#!/usr/bin/env nix-shell
|
|
|
|
#!nix-shell -i bash -p curl common-updater-scripts
|
|
|
|
|
|
|
|
set -euo pipefail
|
|
|
|
|
|
|
|
reaper_ver=$(curl -Ls https://www.reaper.fm/download.php | grep -o 'Version [0-9]\.[0-9]*' | head -n1 | cut -d' ' -f2)
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
function set_hash_for_linux() {
|
2022-10-21 18:38:19 +00:00
|
|
|
local arch=$1
|
|
|
|
pkg_hash=$(nix-prefetch-url https://www.reaper.fm/files/${reaper_ver%.*}.x/reaper${reaper_ver/./}_linux_$arch.tar.xz)
|
|
|
|
pkg_hash=$(nix hash to-sri "sha256:$pkg_hash")
|
2024-06-20 14:57:18 +00:00
|
|
|
update-source-version reaper "${reaper_ver}" "$pkg_hash" --system=$arch-linux --ignore-same-version
|
2022-10-21 18:38:19 +00:00
|
|
|
}
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
function set_hash_for_darwin() {
|
|
|
|
local arch=$1
|
|
|
|
pkg_hash=$(nix-prefetch-url https://www.reaper.fm/files/${reaper_ver%.*}.x/reaper${reaper_ver/./}_universal.dmg)
|
|
|
|
pkg_hash=$(nix hash to-sri "sha256:$pkg_hash")
|
2024-06-20 14:57:18 +00:00
|
|
|
update-source-version reaper "${reaper_ver}" "$pkg_hash" --system=$arch-darwin --ignore-same-version
|
2024-01-02 11:29:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
set_hash_for_linux aarch64
|
|
|
|
set_hash_for_linux x86_64
|
|
|
|
set_hash_for_darwin aarch64
|