20 lines
403 B
Batchfile
20 lines
403 B
Batchfile
@echo off
|
|
echo Updating tools...
|
|
|
|
cd /d C:\tools
|
|
|
|
powershell -NoProfile -Command ^
|
|
"$p = Start-Process 'git' 'pull' -PassThru -NoNewWindow; ^
|
|
if (-not $p.WaitForExit(10*1000)) { try { $p.Kill() } catch {} ; exit 1 } ^
|
|
exit $p.ExitCode"
|
|
|
|
if errorlevel 1 (
|
|
echo Git pull failed/timed out (offline?). Continuing...
|
|
)
|
|
|
|
echo Starting...
|
|
cd /d C:\magicis\agent
|
|
start "" "C:\magicis\agent.bat"
|
|
|
|
exit
|