Created
May 15, 2025 02:55
-
-
Save morgan9e/e44989a2a8d884bca9a76b72d70c6803 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # system | |
| SRC=[ | |
| system/lineage/waydroid_x86_64/VANILLA.json | |
| system/lineage/waydroid_x86_64/GAPPS.json | |
| vendor/waydroid_x86_64/MAINLINE.json | |
| ] | |
| for CHAN in ${SRC}; do | |
| echo Processing $CHAN..." | |
| eval $(curl -s https://raw.githubusercontent.com/waydroid/OTA/refs/heads/master/$CHAN | jq -r '.response | .[0] | "DATE=\(.datetime) FILENAME=\"\(.filename)\" ROMTYPE=\(.romtype) HASH=\(.id) URL=\"\(.url)\" VERSION=\(.version) SIZE=\(.size)"') | |
| PATH="$(dirname $CHAN)" | |
| FILE="$PATH/$FILENAME" | |
| MANI="$PATH/$CHAN.json" | |
| DLFL="$HOST/waydroid/$FILE" | |
| if [ -f $FILE ]; then | |
| echo "Skipping $FILE" | |
| break | |
| fi | |
| echo "Downloading $FILE..." | |
| curl -sL $URL | pv > $FILE; | |
| SIZE="$(stat -c %s $FILE)" | |
| cat << EOF > $MANI | |
| { | |
| "response": [ | |
| { | |
| "datetime": $DATE, | |
| "filename": "$FILENAME", | |
| "id": "$HASH", | |
| "romtype": "$ROMTYPE", | |
| "size": $SIZE, | |
| "url": "$DLFL", | |
| "version": "$VERSION" | |
| } | |
| ] | |
| } | |
| EOF | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment