Created
May 22, 2020 13:18
-
-
Save yanonono/c20a46fa33d45c83713428a3ea16551e to your computer and use it in GitHub Desktop.
VRChat SDK(vrcsdk) update check
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 | |
| if [ $# -ne 1 ]; then | |
| SDK_VERSION=2 | |
| else | |
| SDK_VERSION=$1 | |
| fi | |
| SDK_URL=https://vrchat.com/download/sdk$SDK_VERSION | |
| SDK_VERSION_FILE=~/cron.shell/vrc_sdk_version$SDK_VERSION.txt | |
| NOW_VERSION=`curl $SDK_URL -si | grep '^location: '` | |
| diff $SDK_VERSION_FILE <(echo $NOW_VERSION) 1> /dev/null 2>&1 | |
| if [ $? -eq 1 ]; then | |
| # update sdk | |
| echo "update it. sdk version $SDK_VERSION, $NOW_VERSION" | |
| fi | |
| echo $NOW_VERSION > $SDK_VERSION_FILE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment