Skip to content

Commit

Permalink
Update check_update.bat
Browse files Browse the repository at this point in the history
  • Loading branch information
vocatus authored Apr 3, 2017
1 parent 997ba8b commit 9d9f4b2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions resources/stage_0_prep/check_update/check_update.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
:: Requirements: Must be called from Tron
:: Author: vocatus on reddit.com/r/TronScript ( vocatus.gate at gmail ) // PGP key: 0x07d1490f82a211a2
:: Version: 1.0.9 * Update wget User-Agent declaration to remove spaces
:: / Simplify custom User-Agent
:: 1.0.8 * Update wget commands to use a custom User-Agent so we can identify Tron update checks/downloads vs. other use of wget against the main repo
:: 1.0.7 / Replace string "SCRIPT" with "TRON" in REPO_SCRIPT_VERSION, REPO_SCRIPT_DATE, SCRIPT_VERSION, and SCRIPT_DATE variables (to support Tron v10.0.0)
:: * Update version comparison code to handle new v10 version string (batch can only do arithmatic comparison, not decimal)
Expand All @@ -21,7 +22,7 @@
:: PREP AND CHECKS ::
:::::::::::::::::::::
set CHECK_UPDATE_VERSION=1.0.9
set CHECK_UPDATE_VERSION=2017-03-29
set CHECK_UPDATE_VERSION=2017-04-02

:: Variables used during the update check
set REPO_URL=https://bmrf.org/repos/tron
Expand Down Expand Up @@ -52,7 +53,7 @@ if /i "%LOGFILE%"=="" (
:::::::::::::::::::::::

:: wget sha256sums.txt from the repo
stage_0_prep\check_update\wget.exe --user-agent="Tron-Update-Checker/%TRON_VERSION% (Windows; %WIN_VER%; %WIN_VER_NUM%)" %REPO_URL%/sha256sums.txt -O "%TEMP%\sha256sums.txt" 2>NUL
stage_0_prep\check_update\wget.exe --user-agent="Tron-Update-Checker/%TRON_VERSION% (%WIN_VER%)" %REPO_URL%/sha256sums.txt -O "%TEMP%\sha256sums.txt" 2>NUL
:: Assuming there was no error, go ahead and extract version number into REPO_TRON_VERSION, and release date into REPO_TRON_DATE
if /i %ERRORLEVEL%==0 (
for /f "tokens=4 delims=,()" %%a in (%TEMP%\sha256sums.txt) do set WORKING=%%a
Expand Down Expand Up @@ -107,7 +108,7 @@ if /i %TRON_VERSION:.=% LSS %REPO_TRON_VERSION:.=% (
echo.
echo %TIME% Downloading new version to the desktop, please wait...
echo.
stage_0_prep\check_update\wget.exe --user-agent="Tron-Update-Downloader/%TRON_VERSION% (Windows; %WIN_VER%; %WIN_VER_NUM%)" "%REPO_URL%/Tron v%REPO_TRON_VERSION% (%REPO_TRON_DATE%).exe" -O "%USERPROFILES%\%USERNAME%\Desktop\Tron v%REPO_TRON_VERSION% (%REPO_TRON_DATE%).exe"
stage_0_prep\check_update\wget.exe --user-agent="Tron-Update-Downloader/%TRON_VERSION% (%WIN_VER%)" "%REPO_URL%/Tron v%REPO_TRON_VERSION% (%REPO_TRON_DATE%).exe" -O "%USERPROFILES%\%USERNAME%\Desktop\Tron v%REPO_TRON_VERSION% (%REPO_TRON_DATE%).exe"
echo.
echo %TIME% Download finished.
echo.
Expand Down

0 comments on commit 9d9f4b2

Please sign in to comment.