summaryrefslogtreecommitdiff
path: root/tools/build_scripts/fixme.cmd
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-10-05 11:44:29 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-10-05 11:44:29 +0300
commitf364fc14fbc17dcfad7690a4af40300eb7162e98 (patch)
treed93f89a30602f760f1692e7496885ed38a8c8e43 /tools/build_scripts/fixme.cmd
parent29525682b9c3e1db59b095bb389235e48629cd44 (diff)
fixme.cmd: mirandaboot.ini parsing added
Diffstat (limited to 'tools/build_scripts/fixme.cmd')
-rw-r--r--tools/build_scripts/fixme.cmd18
1 files changed, 13 insertions, 5 deletions
diff --git a/tools/build_scripts/fixme.cmd b/tools/build_scripts/fixme.cmd
index 853815fcdb..2c57e9f436 100644
--- a/tools/build_scripts/fixme.cmd
+++ b/tools/build_scripts/fixme.cmd
@@ -1,12 +1,20 @@
-@echo off
+@echo on
+
+set ProfileDir=%~dp0Profiles
+
+for /F "tokens=1,2 delims== " %%a in ('findstr "ProfileDir=" mirandaboot.ini') do (
+ set ProfileDir=%%b
+)
+
+echo Using profile directory %ProfileDir%
if "%1" == "" (
set /A ProfileCount=0
- pushd %~dp0Profiles
+ pushd %ProfileDir%
for /D %%i in (*) do (
- if exist "%~dp0Profiles\%%i\%%i.dat" (
+ if exist "%ProfileDir%\%%i\%%i.dat" (
set ProfileName=%%i
set /A ProfileCount=%ProfileCount%+1
)
@@ -15,7 +23,7 @@ if "%1" == "" (
popd
) else (
- if not exist "%~dp0Profiles\%1\%1.dat" (
+ if not exist "%ProfileDir%\%1\%1.dat" (
echo Wrong profile name specified: %1
goto :eof
)
@@ -25,7 +33,7 @@ if "%1" == "" (
echo Backing up %ProfileName%...
-set FullProfileName=.\Profiles\%ProfileName%\%ProfileName%.dat
+set FullProfileName=%ProfileDir%\%ProfileName%\%ProfileName%.dat
set TmpFileName=%TEMP%\%ProfileName%.tmp
del "%TmpFileName%" > nul