Return-Path: Delivered-To: apmail-jakarta-velocity-user-archive@jakarta.apache.org Received: (qmail 68644 invoked by uid 500); 10 May 2001 10:56:23 -0000 Mailing-List: contact velocity-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Reply-To: velocity-user@jakarta.apache.org Delivered-To: mailing list velocity-user@jakarta.apache.org Received: (qmail 68385 invoked from network); 10 May 2001 10:56:17 -0000 Date: Thu, 10 May 2001 07:54:39 -0400 From: "Geir Magnusson Jr." Subject: Re: Cygwin Patchs for example shell scripts Sender: gmj@mta4.srv.hcvlny.cv.net To: velocity-user@jakarta.apache.org Message-id: <3AFA817F.A36C7659@optonline.net> MIME-version: 1.0 X-Mailer: Mozilla 4.7 [en] (X11; U; Linux 2.2.16 i686) Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7BIT X-Accept-Language: en References: X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N done. thanks "Hensley, Richard" wrote: > > 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 > -- Geir Magnusson Jr. geirm@optonline.net System and Software Consulting Developing for the web? See http://jakarta.apache.org/velocity/ "still climbing up to the shoulders..."