Skip to content

Commit

Permalink
clean up ruffle script a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
emma-sg committed Dec 23, 2024
1 parent b404103 commit 5d7ed5c
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions ruffle/download-latest-ruffle.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
#!/bin/bash
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)

RUFFLE_DIR=$SCRIPT_DIR

SELFHOST_URL=$(curl "https://api.github.com/repos/ruffle-rs/ruffle/releases" | jq -r '.[0].assets[] | select(.name | contains("selfhosted")) | .browser_download_url')
SELFHOST_URL=$(curl -s "https://api.github.com/repos/ruffle-rs/ruffle/releases" | jq -r '.[0].assets[] | select(.name | contains("selfhosted")) | .browser_download_url')

echo "$SELFHOST_URL"

curl -L -o $RUFFLE_DIR/ruffle.zip "$SELFHOST_URL"
curl -L -o "$RUFFLE_DIR/ruffle.zip" "$SELFHOST_URL"

rm $RUFFLE_DIR/*.js $RUFFLE_DIR/*.wasm
rm "$RUFFLE_DIR/*.js" "$RUFFLE_DIR/*.wasm"

cd $RUFFLE_DIR
unzip $RUFFLE_DIR/ruffle.zip *.js *.wasm
cd "$RUFFLE_DIR" || exit 1
unzip "$RUFFLE_DIR/ruffle.zip" "*.js" "*.wasm"

rm $RUFFLE_DIR/ruffle.zip
rm "$RUFFLE_DIR/ruffle.zip"

0 comments on commit 5d7ed5c

Please sign in to comment.