@echo off setlocal enabledelayedexpansion FOR /F "tokens=*" %%g IN ('git config --get remote.origin.url') do (SET remote=%%g) echo %remote% | findstr /C:"github.com/aspl-lang/aspl" > nul && ( git pull origin main ) || ( git clone https://github.com/aspl-lang/aspl.git cd aspl ) curl -L -o jq.exe https://github.com/stedolan/jq/releases/latest/download/jq-win64.exe IF DEFINED GITHUB_TOKEN ( SET AUTH_HEADER=Authorization: token %GITHUB_TOKEN% ) ELSE ( SET AUTH_HEADER= ) curl -s -H "%AUTH_HEADER%" https://api.github.com/repos/aspl-lang/cd/contents/latest.txt | jq -r .content > sha.txt certutil -decode sha.txt sha_decoded.txt SET /p SHA= id.txt SET /p ASSET_ID= id.txt SET /p ASSET_ID=