From cea0f4c26386327dfc53dcbe4c08fe8f515a5e18 Mon Sep 17 00:00:00 2001 From: Glen De Cauwsemaecker <decauwsemaecker.glen@gmail.com> Date: Sun, 23 Mar 2014 03:05:16 +0100 Subject: [PATCH] license agreement added to the setup. --- .../windows/coco-dev-setup/batch/ask_question.bat | 5 +++++ scripts/windows/coco-dev-setup/batch/setup.bat | 5 +++++ .../windows/coco-dev-setup/batch/sign_license.bat | 14 ++++++++++++++ 3 files changed, 24 insertions(+) create mode 100755 scripts/windows/coco-dev-setup/batch/ask_question.bat create mode 100755 scripts/windows/coco-dev-setup/batch/sign_license.bat 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