changeset 6131:9a6e5cae5275

[project @ 2006-11-01 18:25:54 by jwe]
author jwe
date Wed, 01 Nov 2006 18:25:54 +0000
parents 6eba20084f8f
children e49ad821587e
files ChangeLog run-octave.in
diffstat 2 files changed, 14 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Nov 01 16:54:04 2006 +0000
+++ b/ChangeLog	Wed Nov 01 18:25:54 2006 +0000
@@ -1,6 +1,6 @@
 2006-11-01  John W. Eaton  <jwe@octave.org>
 
-	* run-octave.in: eval the exec, to avoid passing "" on the command line.
+	* run-octave.in: Handle quoted args properly in exec call?
 
 2006-10-29  John W. Eaton  <jwe@octave.org>
 
--- a/run-octave.in	Wed Nov 01 16:54:04 2006 +0000
+++ b/run-octave.in	Wed Nov 01 18:25:54 2006 +0000
@@ -5,8 +5,8 @@
 # FIXME -- is there a better way to handle the possibility of spaces
 # in these names? 
 
-top_srcdir="%abs_top_srcdir%"
-builddir="%builddir%"
+top_srcdir='%abs_top_srcdir%'
+builddir='%builddir%'
 
 d1="$top_srcdir/test"
 d2="$top_srcdir/scripts"
@@ -26,7 +26,8 @@
 LOADPATH="$d1_path:$d2_path:$d3_path:$d4_path"
 IMAGEPATH="$top_srcdir/scripts/image"
 
-args="--path=\"$LOADPATH\" --image-path=\"$IMAGEPATH\""
+args="--path=$LOADPATH --image-path=$IMAGEPATH"
+qargs="--path=\"$LOADPATH\" --image-path=\"$IMAGEPATH\""
 
 if [ $# -gt 0 ]; then
   if [ "x$1" = "x-g" ]; then
@@ -46,6 +47,12 @@
   fi
 fi
 
-OCTAVE_SITE_INITFILE="$top_srcdir/scripts/startup/main-rcfile" \
-%library_path_var%="$builddir/src:$builddir/liboctave:$builddir/libcruft:$%library_path_var%" \
-  eval exec $driver "$builddir/src/octave" "$args" "$@"
+if [ -n "$args" ]; then
+  OCTAVE_SITE_INITFILE="$top_srcdir/scripts/startup/main-rcfile" \
+  %library_path_var%="$builddir/src:$builddir/liboctave:$builddir/libcruft:$%library_path_var%" \
+    exec $driver "$builddir/src/octave" "$args" "$@"
+else
+  OCTAVE_SITE_INITFILE="$top_srcdir/scripts/startup/main-rcfile" \
+  %library_path_var%="$builddir/src:$builddir/liboctave:$builddir/libcruft:$%library_path_var%" \
+    exec $driver "$builddir/src/octave" "$@"
+fi