1
0
mirror of https://github.com/mintty/wsltty.git synced 2025-01-18 12:05:47 +00:00

additional quoting for CMD variables (#213)

This commit is contained in:
Thomas Wolff 2020-01-20 00:00:00 +01:00
parent 40fe1db02c
commit 2aace74c9d
3 changed files with 10 additions and 10 deletions

View File

@ -5,7 +5,7 @@ case "$installdir" in
"") custominst=false;;
esac
INSTDIR=${installdir:-$LOCALAPPDATA/wsltty}
INSTDIR="${installdir:-$LOCALAPPDATA/wsltty}"
INSTDIR=`cd "$INSTDIR"; pwd`
installdir=${installdir:-'%LOCALAPPDATA%\wsltty'}
@ -15,7 +15,7 @@ case "$INSTDIR" in
*) TARGETPATH="$INSTDIR"/bin/mintty.exe;;
esac
CONFDIR=${configdir:-$APPDATA/wsltty}
CONFDIR="${configdir:-$APPDATA/wsltty}"
configdir=${configdir:-'%APPDATA%\wsltty'}
PATH=/bin:"$PATH":$SYSTEMROOT/System32

View File

@ -1,12 +1,12 @@
@echo off
set refinstalldir=%%LOCALAPPDATA%%\wsltty
set installdir=%LOCALAPPDATA%\wsltty
set installdir="%LOCALAPPDATA%\wsltty"
set refconfigdir=%%APPDATA%%\wsltty
set configdir=%APPDATA%\wsltty
set oldroot=%installdir%
set oldhomedir=%installdir%\home\%USERNAME%
set oldconfigdir=%oldhomedir%\.config\mintty
set configdir="%APPDATA%\wsltty"
set oldroot="%installdir%"
set oldhomedir="%installdir%\home\%USERNAME%"
set oldconfigdir="%oldhomedir%\.config\mintty"
if not "%1" == "" set refinstalldir=%1 && set installdir=%1
if not "%2" == "" set refconfigdir=%2 && set configdir=%2
@ -79,7 +79,7 @@ copy mintty.ico "%installdir%\usr\share\mintty\icon"
rem create Start Menu Folder
set smf=%APPDATA%\Microsoft\Windows\Start Menu\Programs\WSLtty
set smf="%APPDATA%\Microsoft\Windows\Start Menu\Programs\WSLtty"
mkdir "%smf%"
rem clean up previous installation

View File

@ -1,12 +1,12 @@
@echo off
if "%installdir%" == "" set installdir=%LOCALAPPDATA%\wsltty
if "%installdir%" == "" set installdir="%LOCALAPPDATA%\wsltty"
:shortcuts
rem delete Start Menu Folder
set smf=%APPDATA%\Microsoft\Windows\Start Menu\Programs\WSLtty
set smf="%APPDATA%\Microsoft\Windows\Start Menu\Programs\WSLtty"
rmdir /S /Q "%smf%"