ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Pogonyshev <>
Subject one more problem
Date Mon, 20 Feb 2006 13:28:13 GMT

I'm stuck again :(

I need to translate the following part of a shell script to Ant (with
Ant-Contrib in place; using external `sed' is not an option, I want
to minimize dependencies for Windows boxes):

for PO_FILE in *.po; do
  LOCALE=$(echo "$PO_FILE" | sed -e 's/\.po$//')
  RESOURCE_FILE=$(echo "$RESOURCE_NAME" | sed -e "s/\./\//g")

  if test "$CLASS_FILE" -ot "$PO_FILE"; then
    mkdir -p "$RESOURCE_DIRECTORY"/$(echo "$RESOURCE_NAME" | sed -e "s/^[^.]\+$//" -e "s/\.[^.]\+$//"
-e "s/\./\//g")
    msgfmt  --java2			\
	    --resource="$RESOURCE_NAME"	\
	    --locale="$LOCALE"		\
	    --check --statistics	\

I'm having problems with variable calculation.  RESOURCE_NAME in
the script has the form of `', how do I compute
`org/foo/bar/L10n' out of it in Ant?

Also, I'd like to compute the locale out of file name, though
this is not important.

Thanks in advance,

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message