Hi,
I think the loop on windows is something like the following:
FOR /F %%a IN ('dir/b %LIBDIR%\*.jar') do call :jaradd %LIBDIR%\%%a
...
REM This has to be on the end of the Batch-Script
:jaradd
if not "%CRUISE_PATH%"=3D=3D"" set CRUISE_PATH=3D;%CRUISE_PATH%
set CRUISE_PATH=3D%1%CRUISE_PATH%
goto :EOF
I have tested this on my windows machine and it worked. Take care of=20
taking the whole line out of the current script
because the cruisecontrol.jar is in s different dir. I attached a diff.tx=
t.
Hope this is what you are looking for
Michael
<cid:part1.06020906.02030103@...>
Jerome Lacoste wrote:
>On Fri, 2004-10-29 at 10:34 +0200, Hack Kampbj=F8rn wrote:
> =20
>
>>>-----Original Message-----
>>>From: Jerome Lacoste [mailto:jerome@...
>>>Sent: 29. oktober 2004 09:56
>>>To: cruisecontrol-devel@...
>>>Subject: [Cruisecontrol-devel] [PATCH] cruisecontrol.sh and=20
>>>cruisecontrol.bat are not in sync
>>>
>>>
>>>- there is no warning for the missing JAVA_HOME on Linux/Unix
>>>- STComm.jar is missing in the CRUISE_PATH for both
>>> =20
>>>
>>Should it always be added even when it's not present?
>> =20
>>
>
>I thought about it. The starteam-sdk jar is also optional, but the code
>is written the same way. More about this below.
> =20
>
>>>- x10.jar and comm.jar are missing in the Linux one (a message on the
>>>list said x10 was also working on Linux)
>>> =20
>>>
>>The included comm.jar is only for Windows. Sun also has one for Solaris=
(both sparc and x86) but none for linux. Does x10.jar need comm.jar on l=
inux? Or does comm.jar somehow just work beside Sun's documentation?
>>http://java.sun.com/products/javacomm/downloads/index.html
>> =20
>>
>
>not sure...
>
> =20
>
>>>- the way the CRUISE_PATH is created doesn't make it easy to compare
>>>both scripts. Using one entry per line will make it easier
>>>
>>> =20
>>>
>>Instead of always adding a jar file to the path:
>> CRUISE_PATH=3D$CRUISE_PATH:$LIBDIR/STComm.jar
>>It could also check if the jar file exists:
>> [-e $LIBDIR/STComm.jar ] && CRUISE_PATH=3D$CRUISE_PATH:$LIBDIR/STComm.=
jar
>> =20
>>
>
>
> =20
>
>>Or just add all the jar files in lib. (I think I've seen that somewhere=
) My current bin/cruisecontrol is actually doing that:
>> CRUISE_PATH=3D$JAVA_HOME/lib/tools.jar:$CCDIR/conf:DISTDIR/cruisecontr=
ol-cvs-2004-10-04.jar
>> for j in $LIBDIR/*.jar ; do
>> CRUISE_PATH=3D${CRUISE_PATH}:$j
>> done
>> =20
>>
>
>I wanted to do that. My only problem was that ant jar files are now
>under a separate directory. That's the cleanest approach. As I didn't
>know how to do in Windows, I didn't do it like that. If there's someone
>who has access to a Windows machine who can test / port that little
>loop, then I am all for it. One less thing to maintain.
>
> =20
>
>>I have properties files in conf not '.' But I'll probably move it to et=
c so it doesn't steal tab completion from config.xml 8-)
>> =20
>>
>
>I don't like using . because it really depends from where the user are
>running the script.
>So I would be happy to remove it. But doing so might create problems for
>those upgrading.
>
>J
>
>
>
>-------------------------------------------------------
>This Newsletter Sponsored by: Macrovision=20
>For reliable Linux application installations, use the industry's leading
>setup authoring tool, InstallShield X. Learn more and evaluate=20
>today. http://clk.atdmt.com/MSI/go/ins0030000001msi/direct/01/
>_______________________________________________
>Cruisecontrol-devel mailing list
>Cruisecontrol-devel@...
>https://lists.sourceforge.net/lists/listinfo/cruisecontrol-devel
>
> =20
>
|