changeset 5459:f146714a73c3

* installer-files/cmdshell.bat: allow path set in .bat file ti teh transfers through to bash
author John Donoghue <john.donoghue@ieee.org>
date Fri, 12 Jun 2020 08:00:52 -0400
parents 19fa05ab2de6
children b19af28f7ee3
files installer-files/cmdshell.bat
diffstat 1 files changed, 9 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/installer-files/cmdshell.bat	Thu Jun 11 21:07:54 2020 -0400
+++ b/installer-files/cmdshell.bat	Fri Jun 12 08:00:52 2020 -0400
@@ -1,6 +1,7 @@
 @echo off
 
 set OCTAVE_HOME=%~dp0
+Rem NOTE: OCTAVE_HOME has a end \
 Rem convert to 8.3 format
 for %%I in ("%OCTAVE_HOME%") do set OCTAVE_HOME=%%~sI
 
@@ -15,14 +16,14 @@
 set MSYSTEM=MSYS
 
 Rem if no msys-1.0, must be msys2
-if NOT EXIST %OCTAVE_HOME%\bin\msys-1.0.dll set MSYSDIR=%OCTAVE_HOME%\usr
+if NOT EXIST %OCTAVE_HOME%bin\msys-1.0.dll set MSYSDIR=%OCTAVE_HOME%usr
 
 Rem 32 or 64 bit
-if EXIST %OCTAVE_HOME%\mingw32\bin\octave-cli.exe set MSYSTEM=MINGW32
-if EXIST %OCTAVE_HOME%\mingw64\bin\octave-cli.exe set MSYSTEM=MINGW64
+if EXIST %OCTAVE_HOME%mingw32\bin\octave-cli.exe set MSYSTEM=MINGW32
+if EXIST %OCTAVE_HOME%mingw64\bin\octave-cli.exe set MSYSTEM=MINGW64
 
-if EXIST %OCTAVE_HOME%\mingw32\bin\octave-cli.exe set OCTAVE_HOME=%OCTAVE_HOME%\mingw32
-if EXIST %OCTAVE_HOME%\mingw64\bin\octave-cli.exe set OCTAVE_HOME=%OCTAVE_HOME%\mingw64
+if EXIST %OCTAVE_HOME%mingw32\bin\octave-cli.exe set OCTAVE_HOME=%OCTAVE_HOME%mingw32\
+if EXIST %OCTAVE_HOME%mingw64\bin\octave-cli.exe set OCTAVE_HOME=%OCTAVE_HOME%mingw64\
 
 Rem   Set up PATH. Make sure the octave bin dir
 Rem   comes first.
@@ -31,5 +32,8 @@
 set GS=gs.exe
 set GNUTERM=wxt
 
+Rem tell msys2 to use the paths we set here which matches what octave would do
+set MSYS2_PATH_TYPE=inherit
+
 %MSYSDIR%\bin\bash.exe --login -i