Git setup works.

This commit is contained in:
Glen De Cauwsemaecker 2014-03-26 14:18:34 +01:00
parent a4f6b518ec
commit 6fdcbde61a
3 changed files with 79 additions and 1 deletions

View file

@ -35,6 +35,11 @@
wait=When you're ready, press any key to continue...
[process]
path=Please give the full path of your CodeCombat git repository:
checkout=Please enter the full path where you want to install your CodeCombat environment
bashi=This installation requires Git Bash.
bashp64=Git bash is by default installed at 'C:\Program Files (x86)\Git'.
bashp32=Git bash is by default installed at 'C:\Program Files\Git'.
bashq=Please enter the full path where git bash is installed or just press enter if it's in the default location
[error]
path=That path already exists, are you sure you want to overwrite it?
exist=That path doesn't exist. Please try again...

View file

@ -35,6 +35,11 @@
wait=Wanneer je klaar bent, druk dan eender welke toets om verder te gaan...
[process]
path=Geef alsjeblieft het volledige pad van je CodeCombat git repository:
checkout=Geef alsjeblieft het volledige pad waar je de CodeCombat Ontwikkelings omgeving will installeren
bashi=Deze installatie maakt gebruik van Git Bash.
bashp64=Git bash is normaal geinstalleerd in 'C:\Program Files (x86)\Git'.
bashp32=Git bash is normaal geinstalleerd in 'C:\Program Files\Git'.
bashq=Geef alsjeblieft het volledige pad op van Git Bash of druk gewoon op enter indien je het pad niet gewijzigd heeft
[error]
path=Dat pad bestaat al, ben je zeker dat je het wil overschrijven?
exist=Dat pad bestaat niet, probeer alsjeblieft opnieuw...

View file

@ -36,5 +36,73 @@ if "%result%"=="true" (
goto:exit_git_setup
)
goto:get_bash_path
:get_bash_path
call get_local_text github-process-bashi
echo !github_process_bashi!
if not defined install_system_bit (
call print_dashed_seperator
call get_system_information
call print_dashed_seperator
)
if "%system_info_bit%"=="64" (
call get_local_text github-process-bashp64
echo !github_process_bashp64!
) else (
call get_local_text github-process-bashp32
echo !github_process_bashp32!
)
call get_local_text github-process-bashq
set /p "git_bash_path=!github_process_bashq!: "
if not defined git_bash_path (
if "%system_info_bit%"=="64" (
set "git_bash_path=C:\Program Files (x86)\Git"
) else (
set "git_bash_path=C:\Program Files\Git"
)
goto:get_git_path
)
if not exist "%git_bash_path%" (
call get_local_text error-exist
echo !error_exist!
call print_dashed_seperator
goto:get_bash_path
) else (
goto:get_git_path
)
goto:eof
:get_git_path
call print_dashed_seperator
call get_local_text github-process-checkout
set /p "repository_path=!github_process_checkout!: "
if exist !repository_path! (
call get_local_text error-path
call ask_question "!error_path!"
if "!result!"=="false" (
call print_dashed_seperator
goto:get_git_path
) else (
rmdir /s /q %repository_path%
)
) else (
goto:git_checkout
)
goto:eof
:git_checkout
call print_dashed_seperator
set "git_app_path=%git_bash_path%\bin\git.exe"
"%git_app_path%" clone https://github.com/codecombat/codecombat.git "%repository_path%"
goto:exit_git_setup
goto:eof
:exit_git_setup
call print_dashed_seperator
call print_dashed_seperator
goto:eof