1
0
mirror of https://github.com/mintty/wsltty.git synced 2025-01-18 03:55:49 +00:00

fix handling of empty/non-empty folder parameters

This commit is contained in:
mintty 2024-11-23 00:00:00 +01:00
parent a7b8792e76
commit 05a439b5b0

View File

@ -12,14 +12,20 @@ call dequote oldroot
call dequote oldhomedir
set oldconfigdir="%oldhomedir%\.config\mintty"
call dequote oldconfigdir
rem override installdir, configdir if parameters given
set arg1=%1
set arg2=%2
echo %arg1%
call dequote arg1
echo %arg1%
if "%arg1%" == "%%arg1%%" goto deploy
set refinstalldir=%arg1%
set installdir=%arg1%
set arg2=%2
call dequote arg2
if not "%arg1%" == "" set refinstalldir=%arg1% && set installdir=%arg1%
if not "%arg2%" == "" set refconfigdir=%arg2% && set configdir=%arg2%
if "%arg2%" == "%%arg2%%" goto deploy
set refconfigdir=%arg2%
set configdir=%arg2%
:deploy