velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hensley, Richard" <Richard.Hens...@itb.mckhboc.com>
Subject Cygwin Patchs for example shell scripts
Date Thu, 10 May 2001 03:59:50 GMT
I use CYGWIN for most of my development, and it allows the conversion of a
unix path to a Windows path so that you can run programs, like java -cp,
that expect windows paths. I've patched the example .sh files based upon the
build.sh file. Hope somebody else finds this useful also.

Richard Hensley

examples/app_example1
--- example.sh.orig	Tue Apr 10 05:15:38 2001
+++ example.sh	Wed May  9 20:54:56 2001
@@ -1,9 +1,15 @@
 echo "Running Example with input file 'example.vm'"
 
+_VELCP=.
 for i in ../../bin/*.jar
 do
     _VELCP=$_VELCP:"$i"
 done
 
-java -cp $_VELCP:. Example example.vm  
+# convert the unix path to windows
+if [ "$OSTYPE" = "cygwin32" ] || [ "$OSTYPE" = "cygwin" ] ; then
+    _VELCP=`cygpath --path --windows "$_VELCP"`
+fi
+
+java -cp $_VELCP Example example.vm  
 
examples/app_example2
--- example2.sh.orig	Tue Apr 10 05:16:48 2001
+++ example2.sh	Wed May  9 20:52:07 2001
@@ -5,5 +5,10 @@
     _VELCP=$_VELCP:"$i"
 done
 
+# convert the unix path to windows
+if [ "$OSTYPE" = "cygwin32" ] || [ "$OSTYPE" = "cygwin" ] ; then
+    _VELCP=`cygpath --path --windows "$_VELCP"`
+fi
+
 java -cp $_VELCP Example2
 
examples/logger_example
--- logger_example.sh.orig	Wed May  9 20:48:04 2001
+++ logger_example.sh	Wed May  9 20:48:15 2001
@@ -5,5 +5,10 @@
     _VELCP=$_VELCP:"$i"
 done
 
+# convert the unix path to windows
+if [ "$OSTYPE" = "cygwin32" ] || [ "$OSTYPE" = "cygwin" ] ; then
+    _VELCP=`cygpath --path --windows "$_VELCP"`
+fi
+
 java -cp $_VELCP:. LoggerExample 
 
examples/xmlapp_example
--- xmlapp_example.sh.orig	Wed May  9 20:49:51 2001
+++ xmlapp_example.sh	Wed May  9 20:50:23 2001
@@ -10,5 +10,10 @@
     _VELCP=$_VELCP:"$i"
 done
 
+# convert the unix path to windows
+if [ "$OSTYPE" = "cygwin32" ] || [ "$OSTYPE" = "cygwin" ] ; then
+    _VELCP=`cygpath --path --windows "$_VELCP"`
+fi
+
 java -cp $_VELCP XMLTest xml.vm
 

Mime
View raw message