diff options
Diffstat (limited to 'pkgs/idafree/update.sh')
-rwxr-xr-x | pkgs/idafree/update.sh | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/pkgs/idafree/update.sh b/pkgs/idafree/update.sh new file mode 100755 index 0000000..cf4068e --- /dev/null +++ b/pkgs/idafree/update.sh | |||
@@ -0,0 +1,26 @@ | |||
1 | #! /usr/bin/env nix-shell | ||
2 | #! nix-shell -i bash -p bash curl jq | ||
3 | |||
4 | set -e | ||
5 | |||
6 | urls=( | ||
7 | https://out7.hex-rays.com/files/idafree83_linux.run | ||
8 | https://out7.hex-rays.com/files/idafree83_mac.app.zip | ||
9 | https://out7.hex-rays.com/files/arm_idafree83_mac.app.zip | ||
10 | ) | ||
11 | |||
12 | archs=( | ||
13 | x86_64-linux | ||
14 | x86_64-darwin | ||
15 | aarch64-darwin | ||
16 | ) | ||
17 | |||
18 | hashes=() | ||
19 | for u in "${urls[@]}"; do | ||
20 | hash=$(nix-prefetch-url $u) | ||
21 | hashes=("${hashes[@]}" "$hash") | ||
22 | done | ||
23 | |||
24 | for ((i = 0; i < ${#urls[@]}; i++)); do | ||
25 | echo '{"key":"'${archs[i]}'", "value":{"url":"'${urls[i]}'", "sha256":"'${hashes[i]}'"}}' | ||
26 | done | jq -s from_entries >pkgs/development/tools/analysis/ida-free/srcs.json | ||