On 5/28/01 6:34 PM, "Age Mooy" <[EMAIL PROTECTED]> wrote:
> I checked it on a windows 2000 server machine and it gave me the wrong
> response (ext = sh) because you assume
> that ${os.name} gives back "windows_2000" when really it gives you "windows
> 2000" (with a space). So your
> check should be:
>
> <target name="set-windows2000" if="isWindows 2000">
> <property name="is.Windows" value="true" />
> </target>
Thanks, will fix that and give it a whirl!
> Age
>
>
>> -----Original Message-----
>> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf
>> Of Jason van Zyl
>> Sent: Monday, May 28, 2001 23:45
>> To: Turbine Dev
>> Subject: System Extension Checker
>>
>>
>> Hey,
>>
>> Can people under different windows platforms try this and see
>> if it works. This is for the database creation script in the TDK.
>> Right now you have to set the extension of the script run but Ant
>> can figure that out. I just don't know for sure what
>> System.getProperty("os.name")
>> returns on Windows platforms. This is what Ant uses for its "os.name"
>> property
>> available in build files.
>>
>> <?xml version="1.0"?>
>>
>> <!-- Build file for application -->
>> <project name="ext" default="ext" basedir=".">
>>
>> <property name="is${os.name}" value="true"/>
>>
>> <target name="set-windows2000" if="isWindows_2000">
>> <property name="is.Windows" value="true" />
>> </target>
>>
>> <target name="set-windowsNT" depends="set-windows2000"
>> if="isWindows_NT">
>> <property name="is.Windows" value="true" />
>> </target>
>>
>> <target name="set-windows98" depends="set-windowsNT" if="isWindows_98">
>> <property name="is.Windows" value="true" />
>> </target>
>>
>> <target name="set-unix" depends="set-windows98" unless="is.Windows">
>> <property name="is.Unix" value="true" />
>> </target>
>>
>> <target name="unix-ext" depends="set-unix" if="is.Unix">
>> <property name="ext" value="sh"/>
>> </target>
>>
>> <target name="windows-ext" depends="unix-ext" unless="ext">
>> <property name="ext" value="bat"/>
>> </target>
>>
>> <target name="ext" depends="windows-ext">
>> <echo message="ext = ${ext}"/>
>> </target>
>>
>> </project>
>>
>> --
>> jvz.
>>
>> Jason van Zyl
>> [EMAIL PROTECTED]
>>
>> http://jakarta.apache.org/velocity
>> http://jakarta.apache.org/turbine
>> http://jakarta.apache.org/commons
>> http://tambora.zenplex.org
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
--
jvz.
http://tambora.zenplex.org
http://jakarta.apache.org/turbine
http://jakarta.apache.org/velocity
http://jakarta.apache.org/alexandria
http://jakarta.apache.org/commons
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]