add check for config dir

This commit is contained in:
David Refoua 2022-11-06 11:30:56 +03:30
parent 47caafb800
commit fbe3e17eea

View File

@ -5,7 +5,12 @@ SET CMDER_ROOT=%~dp0
@if "%CMDER_ROOT:~-1%" == "\" SET CMDER_ROOT=%CMDER_ROOT:~0,-1% @if "%CMDER_ROOT:~-1%" == "\" SET CMDER_ROOT=%CMDER_ROOT:~0,-1%
if not exist "%CMDER_ROOT%\config\user_ConEmu.xml" ( if not exist "%CMDER_ROOT%\config\user_ConEmu.xml" (
copy "%CMDER_ROOT%\vendor\ConEmu.xml.default" "%CMDER_ROOT%\config\user_ConEmu.xml" if not exist "%CMDER_ROOT%\config" mkdir "%CMDER_ROOT%\config" 2>nul
copy "%CMDER_ROOT%\vendor\ConEmu.xml.default" "%CMDER_ROOT%\config\user_ConEmu.xml" 1>nul
if %errorlevel% neq 0 (
echo ERROR: CMDER Initialization has Failed
exit /b 1
)
) )
if exist "%~1" ( if exist "%~1" (