Update of /cvsroot/monetdb/MonetDB/src/testing
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv24366

Modified Files:
      Tag: MonetDB_1-20
        Mlog.bat Mlog.in 
Log Message:
Changed, so that
         Mlog -x "echo hello world > foo"
echoes the complete command with indirection and exectutes the
command, redirecting the output to the specified file.
In other words, no extra quoting needed anymore.


Index: Mlog.bat
===================================================================
RCS file: /cvsroot/monetdb/MonetDB/src/testing/Mlog.bat,v
retrieving revision 1.1
retrieving revision 1.1.40.1
diff -u -d -r1.1 -r1.1.40.1
--- Mlog.bat    28 Jun 2002 19:16:42 -0000      1.1
+++ Mlog.bat    26 Oct 2007 12:18:52 -0000      1.1.40.1
@@ -2,12 +2,9 @@
 
 if not '%1' == '-x' (
        echo # ..:..:.. .  %*
-       goto Done
+       goto :EOF
 )
 
-set args=%*
 prompt # $t $g  
 echo on
-call %args:~2%
-
-:Done
+call %~2 %~3 %~4 %~5 %~6 %~7 %~8 %~9

Index: Mlog.in
===================================================================
RCS file: /cvsroot/monetdb/MonetDB/src/testing/Mlog.in,v
retrieving revision 1.8
retrieving revision 1.8.8.1
diff -u -d -r1.8 -r1.8.8.1
--- Mlog.in     3 Jan 2007 12:21:12 -0000       1.8
+++ Mlog.in     26 Oct 2007 12:18:53 -0000      1.8.8.1
@@ -24,10 +24,10 @@
 #      FUNCTIONS
 
 function LOG1 () { prompt="\n# `date +%H:%M:%S` >  " ; { echo -en 
"$prompt$prompt" ; echo -n "$*" ; echo -en "$prompt\n\n" ; } >&2 ; }
-function LOG2 () { LOG1 $* 2>&1 ; LOG1 $* ; }
+function LOG2 () { LOG1 "$@" 2>&1 ; LOG1 "$@" ; }
  
-function LOG1x () { LOG1 $* ; "$@" ; }
-function LOG2x () { LOG2 $* ; "$@" ; }
+function LOG1x () { LOG1 "$@" ; eval "$@" ; }
+function LOG2x () { LOG2 "$@" ; eval "$@" ; }
 
 #############################################################################
 #      MAIN
@@ -44,7 +44,7 @@
        shift
 done
 
-eval $ACTION "$@"
+$ACTION "$@"
 
 #      END
 #############################################################################


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Monetdb-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-checkins

Reply via email to