diff --git a/scripts/windows/coco-dev-setup/batch/ask_question.bat b/scripts/windows/coco-dev-setup/batch/ask_question.bat new file mode 100755 index 000000000..fe7ffdd8c --- /dev/null +++ b/scripts/windows/coco-dev-setup/batch/ask_question.bat @@ -0,0 +1,5 @@ +set /p res="%1 [Y/N]: " +set "result=unset" +if "%res%"=="Y" (set "result=true") +if "%res%"=="y" (set "result=true") +if "%result%"=="unset" (set "result=false") \ No newline at end of file diff --git a/scripts/windows/coco-dev-setup/batch/setup.bat b/scripts/windows/coco-dev-setup/batch/setup.bat index dbf4cd524..7925b9b9f 100755 --- a/scripts/windows/coco-dev-setup/batch/setup.bat +++ b/scripts/windows/coco-dev-setup/batch/setup.bat @@ -13,4 +13,9 @@ call get_config copyright echo Welcome to the automated Installation of the CodeCombat Dev. Environment! echo v%version% authored by %author% and published by %copyright%. +call print_seperator + +call sign_license +if "%result%"=="false" (exit) + endlocal \ No newline at end of file diff --git a/scripts/windows/coco-dev-setup/batch/sign_license.bat b/scripts/windows/coco-dev-setup/batch/sign_license.bat new file mode 100755 index 000000000..47c9fab49 --- /dev/null +++ b/scripts/windows/coco-dev-setup/batch/sign_license.bat @@ -0,0 +1,14 @@ +echo In order to continue the installation of the developers environment +echo you will have to read and agree with the following license: +call print_dashed_seperator + +call print_license +call print_dashed_seperator + +call ask_question "Have you read the license and do you agree with it?" +call print_dashed_seperator + +if "%result%"=="false" ( + echo This setup can't happen without an agreement. + set /p res="Installation and Setup of the CodeCombat environment is cancelled." +) \ No newline at end of file