project-sekai-cursors: init
This commit is contained in:
parent
b730a1516e
commit
63a165b801
4 changed files with 117 additions and 0 deletions
26
pkgs/project-sekai-cursors/fetch-hashes.sh
Executable file
26
pkgs/project-sekai-cursors/fetch-hashes.sh
Executable file
|
@ -0,0 +1,26 @@
|
|||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p curl jq
|
||||
|
||||
# shellcheck shell=bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
groups=("VirtualSinger" "leoneed" "MMJ" "VBS" "WxS" "N25")
|
||||
|
||||
for group in "${groups[@]}"; do
|
||||
tmpfile=$(mktemp)
|
||||
curl -o "$tmpfile" "https://www.colorfulstage.com/upload_images/media/Download/ani%20file-animation-${group}.zip"
|
||||
hash=$(nix-hash --sri --flat --type sha256 "$tmpfile")
|
||||
|
||||
updatedContent=$(jq ".\"$group-ani\" = \"$hash\"" ./hashes.json)
|
||||
echo -E "$updatedContent" > ./hashes.json
|
||||
done
|
||||
|
||||
for group in "${groups[@]}"; do
|
||||
tmpfile=$(mktemp)
|
||||
curl -o "$tmpfile" "https://www.colorfulstage.com/upload_images/media/Download/cur%20file-static-${group}.zip"
|
||||
hash=$(nix-hash --sri --flat --type sha256 "$tmpfile")
|
||||
|
||||
updatedContent=$(jq ".\"$group-cur\" = \"$hash\"" ./hashes.json)
|
||||
echo -E "$updatedContent" > ./hashes.json
|
||||
done
|
Loading…
Add table
Add a link
Reference in a new issue