Skip to content

Commit

Permalink
Fix: fixed pip log creation
Browse files Browse the repository at this point in the history
  • Loading branch information
MetalDevOps committed Feb 11, 2021
1 parent de8b48d commit 8724f97
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 50 deletions.
54 changes: 4 additions & 50 deletions alas.bat
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ rem call command\Get.bat InfoOpt4
call command\Get.bat DeployMode

:: Start of Deployment
set "pipLog=%root%\toolkit\log\pip_update_log_%datetime%.log"
if "%IsUsingGit%"=="yes" if "%DeployMode%"=="unknown" ( xcopy /Y toolkit\config .git\ > NUL )
call :UpdateChecker_Alas
title ^| Alas Run Tool V3 ^| Branch: %BRANCH% ^| Git hash: %LAST_LOCAL_GIT% ^| commit date: %GIT_CTIME% ^|
Expand Down Expand Up @@ -180,49 +181,6 @@ goto :MENU

rem ================= OPTION 5 =================
:Updater_menu
cls
setLocal EnableDelayedExpansion
set "STR3=^| Alas Updater Tool ^|"
set "SIZE=119"
set "LEN=0"
:strLen_Loop
if not "!!STR3:~%LEN%!!"=="" set /A "LEN+=1" & goto :strLen_Loop
set "equal========================================================================================================================"
set "spaces========================================================================================================================"
call echo %%equal:~0,%SIZE%%%
set /a "pref_len=%SIZE%-%LEN%-2"
set /a "pref_len/=2"
set /a "suf_len=%SIZE%-%LEN%-2-%pref_len%"
call echo =%%spaces:~0,%pref_len%%%%%STR3%%%%spaces:~0,%suf_len%%%====
call echo %%equal:~0,%SIZE%%%
endLocal
echo.
echo =======================================================================================================================
echo Chinese users may need setup proxy or region first, check if settings below are correct.
echo Region: %Region%
echo =======================================================================================================================
echo. & echo [*] Choose a Option
echo ^|
echo ^|-- [1] Update Alas
echo ^|
echo ^|
echo ^|-- [2] Update dependencies (Toolkit)
echo ^|
echo ^|
echo.
echo. & echo [3] Settings
echo. & echo [0] Return to the Main Menu
echo =======================================================================================================================
set choice=-1
set /p choice= Please input the option and press ENTER:
echo =======================================================================================================================
if "%choice%"=="1" goto Run_UpdateAlas
if "%choice%"=="2" goto update_toolkit
if "%choice%"=="3" goto Setting
if "%choice%"=="0" goto MENU
echo. & echo == ^| Please input a valid option.
pause > NUL
goto Updater_menu

:Run_UpdateAlas
set source="origin"
Expand Down Expand Up @@ -252,7 +210,7 @@ if /i "%opt6_opt4_choice%"=="T" (
:proceed_alas
if "%Region%"=="cn" set "pip_option=--index-url=https://pypi.tuna.tsinghua.edu.cn/simple" && set "requirements=https://gitee.com/lmeszinc/AzurLaneAutoScript/raw/master/requirements.txt"
echo == ^| Updating requirements.txt
call pip install -r %requirements% %pip_option% --no-warn-script-location > toolkit\Log\pip_update_log_%datetime%.log
call pip install -r %requirements% %pip_option% --no-warn-script-location > %pipLog%
echo == ^| requirements.txt updated!
if "%KeepLocalChanges%"=="disable" (
echo == ^| GIT Found in %gitBin% Proceeding
Expand All @@ -264,11 +222,9 @@ if "%KeepLocalChanges%"=="disable" (
if "%AutoMode%"=="enable" (
echo. & echo == ^| Press any key to proceed to %DefaultServer%
goto %DefaultServer% )
else (
echo == ^| Press any key to proceed
pause > NUL
goto Updater_menu
)
goto MENU
) else (
echo == ^| GIT Found in %gitBin% Proceeding
echo == ^| Updating from %source% repository..
Expand All @@ -279,11 +235,9 @@ if "%KeepLocalChanges%"=="disable" (
if "%AutoMode%"=="enable" (
echo. & echo == ^| Press any key to proceed to %DefaultServer% Server
goto %DefaultServer% )
else (
echo == ^| Press any key to proceed
pause > NUL
goto Updater_menu
)
goto MENU
)
echo. & echo == ^| Please re-run this batch to make the settings take effect.
echo == ^| Please re-run the "alas.bat" to make the settings take effect.
Expand Down
3 changes: 3 additions & 0 deletions command/Get.bat
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ set datetime=%datetime:~0,8%-%datetime:~8,6%
if exist config\alas.ini (
echo f | xcopy /y config\alas.ini config\backup\alas_%datetime%.ini > nul
)
if not exist toolkit\log (
md toolkit\log > nul
)
call command\SystemSet.bat
call command\LanguageSet.bat
if exist config\alas.ini (
Expand Down

0 comments on commit 8724f97

Please sign in to comment.