Simpler LINUXTMP compatible with non-/mnt roots

Sometimes the C drive is not mounted at /mnt
https://docs.microsoft.com/en-us/windows/wsl/wsl-config
wslpath can be used to convert reliably from Windows to Linux paths
master^2
Andrew Bradley 2019-09-21 19:19:58 -04:00 committed by GitHub
parent 00db94cb4f
commit c46729f89e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 3 deletions

View File

@ -1,7 +1,8 @@
@ECHO OFF
SET "LINUXTMP=$(echo '%TMP:\=\\%' | sed -e 's|\\|/|g' -e 's|^\([A-Za-z]\)\:/\(.*\)|/mnt/\L\1\E/\2|')"
echo LINUXTMP = "%LINUXTMP%"
set WSLENV=%WSLENV%:WINTMP
set WINTMP=%TMP%
set LINUXTMP='$(wslpath -u \"$WINTMP\")'
ECHO --- Running Linux installation. You will be prompted for your Ubuntu user's password:
REM One big long command to be absolutely sure we're not prompted for a password repeatedly
@ -48,4 +49,4 @@ echo load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1 auth-anonymous
ECHO When prompted, DO NOT allow 'pulseaudio' access to any of your networks. It doesn't need access.
ECHO All Done
PAUSE
PAUSE