Files
i399tester/checkout.bat
2017-03-25 11:07:33 +02:00

47 lines
554 B
Batchfile

echo off
set USER=%1
set TAG=%2
set TMP=./.tmp
set SUB_DIR=
if "%1" == "" (
echo Usage: %0 user_name tag
exit /b 1
)
if "%TAG%" == "hw3" (
echo hw3 not implemented yet
exit /b 1
)
if "%TAG%" == "hw4" (
echo hw4 not implemented yet
exit /b 1
)
if "%TAG%" == "hw2" (
set SUB_DIR=ng1
)
if "%SUB_DIR%" == "" (
echo unknown tag
exit /b 1
)
git clone https://bitbucket.org/%USER%/i399 %TMP%
if %errorlevel% neq 0 exit /b 1
cd %TMP%
git checkout %TAG%
if %errorlevel% neq 0 exit /b 1
cd %SUB_DIR%
call npm install
call npm start