mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-03-31 07:12:49 -04:00
Current State
This commit is contained in:
parent
5952e0876a
commit
ce51e1dcf3
2 changed files with 56 additions and 16 deletions
scripts/windows/coco-dev-setup/batch
|
@ -48,7 +48,7 @@
|
|||
npm=Installing npm...
|
||||
brnch=Starting brunch....
|
||||
mongodb=Setting up a MongoDB database for you...
|
||||
database=Downloading the last version of the CodeCombat database...
|
||||
db=Downloading the last version of the CodeCombat database...
|
||||
script=Preparing the automatic startup script for you...
|
||||
[error]
|
||||
path=That path already exists, are you sure you want to overwrite it?
|
||||
|
|
|
@ -4,6 +4,60 @@ call print_dashed_seperator
|
|||
set work_directory=%CD%
|
||||
set "coco_root=!repository_path!\coco"
|
||||
|
||||
call print_dashed_seperator
|
||||
call get_local_text npm-mongodb
|
||||
echo !npm_mongodb!
|
||||
|
||||
set "mdb_directory=!repository_path!\cocodb"
|
||||
|
||||
if exist mdb_directory (
|
||||
rmdir /s /q "!mdb_directory!"
|
||||
)
|
||||
|
||||
md !mdb_directory!
|
||||
|
||||
call print_dashed_seperator
|
||||
call get_local_text npm-db
|
||||
echo !npm_db!
|
||||
|
||||
set "curl_app=..\utilities\curl.exe"
|
||||
set "zu_app=..\utilities\7za.exe"
|
||||
set "keystuff=..\utilities\keystuff.exe"
|
||||
|
||||
call get_config database_backup
|
||||
|
||||
cd !mdb_directory!
|
||||
|
||||
start cmd /c "%work_directory%\%keystuff% Alt-Tab && mongod --setParameter textSearchEnabled=true --dbpath !mdb_directory!"
|
||||
|
||||
%curl_app% -k !database_backup! -o dump.tar.gz
|
||||
|
||||
start cmd /c "%work_directory%\%keystuff% Alt-Tab && %zu_app% e dump.tar.gz && del dump.tar.gz && %zu_app% x dump.tar && del dump.tar"
|
||||
|
||||
cd !work_directory!
|
||||
echo %CD%
|
||||
echo %keystuff%
|
||||
%keystuff% Alt-Tab
|
||||
cd !mdb_directory!
|
||||
|
||||
pause
|
||||
|
||||
:: import
|
||||
|
||||
start /wait cmd /c "mongorestore dump"
|
||||
|
||||
:: remove
|
||||
|
||||
rmdir /s /q db
|
||||
|
||||
pause
|
||||
|
||||
call print_dashed_seperator
|
||||
call get_local_text npm-script
|
||||
echo !npm_script!
|
||||
|
||||
:: ---- END
|
||||
|
||||
call get_local_text npm-install
|
||||
echo !npm_install!
|
||||
|
||||
|
@ -35,22 +89,8 @@ cd "!coco_root!"
|
|||
start /wait cmd /c "echo !npm_npm! & npm install"
|
||||
cd "!work_directory!"
|
||||
|
||||
pause
|
||||
:: ------ HERE
|
||||
|
||||
call print_dashed_seperator
|
||||
call get_local_text npm-mongodb
|
||||
echo !npm_mongodb!
|
||||
|
||||
call print_dashed_seperator
|
||||
call get_local_text npm-database
|
||||
echo !npm_database!
|
||||
|
||||
pause
|
||||
|
||||
call print_dashed_seperator
|
||||
call get_local_text npm-script
|
||||
echo !npm_script!
|
||||
|
||||
pause
|
||||
|
||||
call print_dashed_seperator
|
Loading…
Add table
Reference in a new issue