alternative to using sed?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Vivek_Raman
Posted On:   Thursday, August 23, 2001 10:21 AM

hi,


I need to set a property to be a higher-level directory. For example in a Makefile:


			ROOT_DIR= $(shell $(PWD) | $(SED) -e "s/myproj.*/myproj/")
			


Will set ROOT_DIR to the parent directory named 'myproj', no matter how many levels up it is.


I can't figure out a way to do this in Ant. I suppose it is possible to write it as a shell script and return the value back to Ant, but I am not sure how to even do that. Thanks in advance.

Re: alternative to using sed?

Posted By:   Erik_Hatcher  
Posted On:   Thursday, August 23, 2001 02:32 PM

As far as I know there is no way to accomplish this in Ant automatically, and even your make example is shelling out to execute sed.


You could investigate using the