archi: refactored update script

This commit is contained in:
paumr 2024-04-04 18:30:48 +02:00
parent ef8bd65672
commit 776f2865fd
1 changed files with 10 additions and 10 deletions

View File

@ -12,14 +12,14 @@ if [[ "$latestVersion" == "$currentVersion" ]]; then
exit 0
fi
hash_aarch64_darwin=$(nix-prefetch-url https://www.archimatetool.com/downloads/archi/$latestVersion/Archi-Mac-Silicon-$latestVersion.dmg)
hash_x86_64_darwin=$(nix-prefetch-url https://www.archimatetool.com/downloads/archi/$latestVersion/Archi-Mac-$latestVersion.dmg)
hash_x86_64_linux=$(nix-prefetch-url https://www.archimatetool.com/downloads/archi/$latestVersion/Archi-Linux64-$latestVersion.tgz)
update-source-version archi 0 "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=" --system=aarch64-darwin
update-source-version archi $latestVersion $hash_aarch64_darwin --system=aarch64-darwin
update-source-version archi 0 "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=" --system=x86_64-darwin
update-source-version archi $latestVersion $hash_x86_64_darwin --system=x86_64-darwin
update-source-version archi 0 "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=" --system=x86_64-linux
update-source-version archi $latestVersion $hash_x86_64_linux --system=x86_64-linux
for i in \
"aarch64-darwin Archi-Mac-Silicon-$latestVersion.dmg" \
"x86_64-darwin Archi-Mac-$latestVersion.dmg" \
"x86_64-linux Archi-Linux64-$latestVersion.tgz"
do
set -- $i
hash=$(nix-prefetch-url https://www.archimatetool.com/downloads/archi/$latestVersion/$2)
update-source-version archi 0 "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=" --system=$1
update-source-version archi $latestVersion $hash --system=$1
done