Writing and reading to cache (variables) implemented

This commit is contained in:
Glen De Cauwsemaecker 2014-04-11 00:31:05 +02:00
parent 5ff4a33798
commit 8296709555
7 changed files with 21 additions and 7 deletions

View file

@ -1,7 +1,7 @@
@echo off
setlocal EnableDelayedExpansion
call read_cache.bat
call read_cache
call configuration_cmd

View file

@ -49,9 +49,9 @@ if "%download_extension%"=="zip" (
md %mongodb_path%
%systemroot%\System32\xcopy !package_path!!mongodb_original_directory! !mongodb_path! /r /h /s /e /y
setx path ";!mongodb_path!\bin"
call set_environment_var "!mongodb_path!\bin"
goto:clean_up
)

View file

@ -0,0 +1,3 @@
for /F "delims=" %%F in ('call run_script .\\get_var.ps1 ..\\config\\cache.coco %1') do (
set "%1=%%F"
)

View file

@ -0,0 +1,2 @@
call get_cache_var language_id
call get_cache_var repository_path

View file

@ -0,0 +1 @@
setx path ";%~1"

View file

@ -5,9 +5,7 @@ call configuration_cmd
call github_setup
start cmd /c "setup_p3.bat"
call write_cache.bat
call write_cache
call get_local_text switch_install switch install
call get_local_text switch_close switch close

View file

@ -0,0 +1,10 @@
set "cache=..\\config\\cache.coco"
echo ^<?xml version="1.0" encoding="ISO-8859-1" ?^>>%cache%
echo ^<variables^>>>%cache%
echo ^<language_id^>%language_id%^</language_id^>>>%cache%
echo ^<repository_path^>%repository_path%^</repository_path^>>>%cache%
echo ^</variables^>>>%cache%