ERLEDIGT
NEIN
NEIN
ANTWORTEN
2
2
ZUGRIFFE
12922
12922
EMPFEHLEN
-
Hallo
Ich möchte ein File in einem Antscript kopieren.
Je nach OS heisst dieses File jedoch anderst.
Wie kann ich im Antspricpt nun folgendes realisieren:
if OS=Linux
then
...
else if OS=Windos
then
...
else
fehler
hat da jemand eine Ahnung?
-
06.07.05 21:40 #2
- Registriert seit
- Jun 2002
- Ort
- Saarbrücken (Saarland)
- Beiträge
- 9.886
- Blog-Einträge
- 29
Hallo!
Schau mal hier:
Code :1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
<?xml version="1.0"?> <!-- ====================================================================== 06.07.2005 21:18:45 project description Tom ====================================================================== --> <project name="project" default="default"> <description> description </description> <!-- ================================= target: default ================================= --> <target name="default" description="--> description"> <condition property="isWindows"> <os family="windows" /> </condition> <condition property="isUnix"> <os family="unix" /> </condition> <antcall target="os-independent"/> </target> <!-- - - - - - - - - - - - - - - - - - target: os-independent - - - - - - - - - - - - - - - - - --> <target name="os-independent" depends="linux,win32"> <echo>OS-Independent</echo> </target> <!-- - - - - - - - - - - - - - - - - - target: linux - - - - - - - - - - - - - - - - - --> <target name="linux" if="isUnix"> <echo>Linux</echo> </target> <!-- - - - - - - - - - - - - - - - - - target: Win32 - - - - - - - - - - - - - - - - - --> <target name="win32" if="isWindows"> <echo>Windows</echo> </target> </project>
Gruß TomJava rocks!
How to become a good Java Programmer?
Does IT in Java and .Net
The only valid measurement of code quality: WTFs / minute
Blog
Xing
Twitter
-
danke, genau das wonach ich suche
Ähnliche Themen
-
If abfragen :(
Von Cruyff im Forum Algorithmen & Datenstrukturen mit JavaAntworten: 4Letzter Beitrag: 04.12.07, 14:04 -
SQL-Abfragen
Von Atasch im Forum Relationale DatenbanksystemeAntworten: 2Letzter Beitrag: 20.01.07, 15:11 -
SQL Abfragen
Von Hattrix im Forum Relationale DatenbanksystemeAntworten: 2Letzter Beitrag: 15.11.06, 13:56 -
css und db Abfragen
Von Kipperlenny im Forum PHPAntworten: 4Letzter Beitrag: 14.07.06, 06:40 -
MySQL Abfragen zu Access Abfragen umwandeln?
Von Falconbase im Forum Relationale DatenbanksystemeAntworten: 0Letzter Beitrag: 16.04.06, 15:34





Zitieren

Login





