I have an Ant script that performs a copy operation using the ‘copy’ task. It was written for Windows, and has a hardcoded C:\ path as the ‘todir’ argument. I see the ‘exec’ task has an OS argument, is there a similar way to branch a copy based on OS?
Share
I would recommend putting the path in a property, then setting the property conditionally based on the current OS.
As a side benefit, once it is in a property you can override it without editing the Ant script.