From 05a439b5b02d93389040fc3ad0a3e9ae0c4007aa Mon Sep 17 00:00:00 2001 From: mintty Date: Sat, 23 Nov 2024 00:00:00 +0100 Subject: [PATCH] fix handling of empty/non-empty folder parameters --- install.bat | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/install.bat b/install.bat index f6f2a37..7224536 100755 --- a/install.bat +++ b/install.bat @@ -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