Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- :while
- if "%1"=="-d" ( set WORKDIR=%2 & shift & shift & goto :while )
- if "%1"=="--work-dir" ( set WORKDIR="%2" & shift & shift & goto :while )
- if "%1"=="-l"( set LOGDIR="%2" & shift & shift & goto :while)
- if "%1"=="-log-dir"( set LOGDIR="%2" & shift & shift & goto :while)
- if "%1"=="-dh"( set DBHOST="%2" & shift & shift & goto :while)
- if "%1"=="--host"( set DBHOST=%2 & shift & shift & goto :while)
- if "%1"=="-db"( set DATABASE=%2 & shift & shift & goto :while)
- if "%1"=="--database"( set DATABASE=%2 & shift & shift & goto :while)
- if "%1"=="-u"( set DBUSER=%2 & shift & shift & goto :while)
- if "%1"=="--db-user"( set DBUSER=%2 & shift & shift & goto :while)
- if "%1"=="-p"( set DBPASSWORD=%2 & shift & shift & goto :while)
- if "%1"=="--db-password"( set DBPASSWORD=%2 & shift & shift & goto :while)
- if "%1"=="-j"( set JOBS=%2 & shift & shift & goto :while)
- if "%1"=="--jobs"( set JOBS=%2 & shift & shift & goto :while)
- if "%1"=="-ld"( set LOGDROP=%2 & shift & shift & goto :while)
- if "%1"=="--log-drop"( set LOGDROP=%2 & shift & shift & goto :while)
- if "%1"=="-pt"( set PROJECTSTYPE=%2 & shift & shift & goto :while)
- if "%1"=="--projects-type"( set PROJECTSTYPE=%2 & shift & shift & goto :while)
- if "%1"=="-pn"( set PROJECTNAME=%2 & shift & shift & goto :while)
- if "%1"=="--projects-name"( set PROJECTNAME=%2 & shift & shift & goto :while)
- if "%1"=="-jc"( set JOBSBATCH=%2 & shift & shift & goto :while)
- if "%1"=="--jobs-batch"( set JOBSBATCH=%2 & shift & shift & goto :while)
- if "%1"=="-def"( set DEFAULT=YES & shift & goto :while)
- if "%1"=="-default"( set DEFAULT=YES & shift & goto :while)
- if "%1"==""(set /a POSITIONAL+=%1 & shift & goto :endwhile)
- :endwhile
- wmic csproduct get "UUID">mac.txt
- echo %UUID%
- SET /P UUID=<mac.txt
- set file = mac.txt
- set old = "UUID"
- more +1 "mac.txt" >"file.txt.new"
- move /y "file.txt.new" "mac.txt" >nul
- SET /P UUID=<mac.txt
- rem For /F "usebackq tokens=* skip=1 delims=" %%i In (%file%) Do Set UUID=%%i
- echo %UUID%
- pause
- :uniqLoop
- set "WORKDIR=bat~%RANDOM%.tmp"
- if exist "%WORKDIR%" goto :uniqLoop
- echo >"%WORKDIR%"
- :: Запись переменной в файл для проверки
- echo %perem%
- set LOGDIR="./Logs"
- set LOGDROP=NO
- set DBHOST=localhost
- set DATABASE=DAE
- set DBUSER=root
- set DBPASSWORD=1
- set JOBS=0.8
- set PROJECTSTYPE=*
- set PROJECTNAME=*
- set JOBSRECHECK=5
- set JOBSBATCH=100
- set DEFAULT=NO
- for %%a in (%CD%) do set /a cnt+=1
- REM echo %cnt%
- rem ## worker_start.sh -d tmp - l
- set f_sr="-d"
- set POSITIONAL=()
- :while
- pause
- echo %1
- echo %2
- pause
- if "%1"=="-d" ( set WORKDIR=%2 & shift & shift & goto :while )
- if "%1"=="--work-dir" ( set WORKDIR="%2" & shift & shift & goto :while )
- if "%1"=="-l"( set LOGDIR="%2" & shift & shift & goto :while)
- if "%1"=="-log-dir"( set LOGDIR="%2" & shift & shift & goto :while)
- if "%1"=="-dh"( set DBHOST="%2" & shift & shift & goto :while)
- if "%1"=="--host"( set DBHOST=%2 & shift & shift & goto :while)
- if "%1"=="-db"( set DATABASE=%2 & shift & shift & goto :while)
- if "%1"=="--database"( set DATABASE=%2 & shift & shift & goto :while)
- if "%1"=="-u"( set DBUSER=%2 & shift & shift & goto :while)
- if "%1"=="--db-user"( set DBUSER=%2 & shift & shift & goto :while)
- if "%1"=="-p"( set DBPASSWORD=%2 & shift & shift & goto :while)
- if "%1"=="--db-password"( set DBPASSWORD=%2 & shift & shift & goto :while)
- if "%1"=="-j"( set JOBS=%2 & shift & shift & goto :while)
- if "%1"=="--jobs"( set JOBS=%2 & shift & shift & goto :while)
- if "%1"=="-ld"( set LOGDROP=%2 & shift & shift & goto :while)
- if "%1"=="--log-drop"( set LOGDROP=%2 & shift & shift & goto :while)
- if "%1"=="-pt"( set PROJECTSTYPE=%2 & shift & shift & goto :while)
- if "%1"=="--projects-type"( set PROJECTSTYPE=%2 & shift & shift & goto :while)
- if "%1"=="-pn"( set PROJECTNAME=%2 & shift & shift & goto :while)
- if "%1"=="--projects-name"( set PROJECTNAME=%2 & shift & shift & goto :while)
- if "%1"=="-jc"( set JOBSBATCH=%2 & shift & shift & goto :while)
- if "%1"=="--jobs-batch"( set JOBSBATCH=%2 & shift & shift & goto :while)
- if "%1"=="-def"( set DEFAULT=YES & shift & goto :while)
- if "%1"=="-default"( set DEFAULT=YES & shift & goto :while)
- if "%1"==""(set /a POSITIONAL+=%1 & shift & goto :endwhile)
- :endwhile
- echo "Hello, while is over"
- echo "Worker start with options:"
- echo %UUID%
- echo %WORKDIR%
- echo %LOGDIR%
- echo %LOGDROP%
- echo %DBHOST%
- echo %DATABASE%
- echo %DBUSER%
- echo %DBPASSWORD%
- echo %JOBS%
- echo %PROJECTSTYPE%
- echo %PROJECTNAME%
- echo %JOBSRECHECK%
- echo %JOBSBATCH%
- echo %DEFAULT%
- echo %POSITIONAL%
- python worker_start.py --work-dir %WORKDIR% --log-dir %LOGDIR% -dh %DBHOST% -db %DATABASE% -u %DBUSER% -p %DBPASSWORD% -j %JOBS% -ld %LOGDROP% -pt %PROJECTSTYPE% -pn %PROJECTNAME% -jc %JOBSRECHECK% -jb %JOBSBATCH% -def %DEFAULT% --UUID %UUID%
- pause
Add Comment
Please, Sign In to add comment