changeset 4257:8f71549f53b9

cmdshell: set HOME and OCTAVE_HOME without spaces (Bug #49765) * installer-files/cmdshell.bat: set HOME env if not set, convert HOME, OCTAVE_HOME to 8.3 path format.
author John D
date Mon, 05 Dec 2016 17:46:56 -0500
parents b5b3f7fcac8f
children a45374f7d9a3
files installer-files/cmdshell.bat
diffstat 1 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/installer-files/cmdshell.bat	Thu Dec 01 14:26:53 2016 -0500
+++ b/installer-files/cmdshell.bat	Mon Dec 05 17:46:56 2016 -0500
@@ -1,6 +1,8 @@
 @echo off
 
 set OCTAVE_HOME=%~dp0
+Rem convert to 8.3 format
+for %%I in ("%OCTAVE_HOME%") do set OCTAVE_HOME=%%~sI
 
 Rem   Set up PATH. Make sure the octave bin dir
 Rem   comes first.
@@ -10,6 +12,12 @@
 set GS=gs.exe
 set GNUTERM=windows
 
-%OCTAVE_HOME%\bin\bash.exe
+Rem set home if not already set
+if "%HOME%"=="" set HOME=%USERPROFILE%
+if "%HOME%"=="" set HOME=%HOMEDRIVE%%HOMEPATH%
 
+Rem set HOME to 8.3 format
+for %%I in ("%HOME%") do set HOME=%%~sI
 
+%OCTAVE_HOME%\bin\bash.exe --login -i
+