Refactor how NickelMenu is set up
All checks were successful
Build and test project / build-and-test (push) Successful in 1m32s
All checks were successful
Build and test project / build-and-test (push) Successful in 1m32s
This commit is contained in:
24
readerly/setup.sh
Executable file
24
readerly/setup.sh
Executable file
@@ -0,0 +1,24 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||
PUBLIC_DIR="$SCRIPT_DIR/../web/src/readerly"
|
||||
|
||||
mkdir -p "$PUBLIC_DIR"
|
||||
|
||||
# Get latest release download URL for KF_Readerly.zip
|
||||
echo "Fetching latest Readerly release..."
|
||||
DOWNLOAD_URL=$(curl -fsSL https://api.github.com/repos/nicoverbruggen/readerly/releases/latest \
|
||||
| jq -r '.assets[] | select(.name == "KF_Readerly.zip") | .browser_download_url')
|
||||
|
||||
if [ -z "$DOWNLOAD_URL" ] || [ "$DOWNLOAD_URL" = "null" ]; then
|
||||
echo "Error: Could not find KF_Readerly.zip in latest release"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Downloading KF_Readerly.zip..."
|
||||
curl -fSL -o "$PUBLIC_DIR/KF_Readerly.zip" "$DOWNLOAD_URL"
|
||||
echo " -> $(du -h "$PUBLIC_DIR/KF_Readerly.zip" | cut -f1)"
|
||||
|
||||
echo ""
|
||||
echo "Done. Assets written to: $PUBLIC_DIR"
|
||||
Reference in New Issue
Block a user