cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Reinhard Poetz <reinh...@apache.org>
Subject Re: Javadocs
Date Thu, 27 Sep 2007 22:53:14 GMT
Vadim Gritsenko wrote:
> Reinhard Poetz wrote:
>> thanks. The command seems to work but I have a problem to execute the 
>> script because David is the owner and neither chown nor chmod are 
>> permitted using my account:
>>
>> /x1/www/cocoon.apache.org/2.2/core-modules/pipeline-api/1.0/apidocs
>>  > ls -lsa
>> total 14
>>  2 drwxrwxr-x  3 crossley  cocoon   512 Sep 26 17:08 .
>>  2 drwxrwxr-x  6 crossley  cocoon   512 Sep 26 17:08 ..
>>  2 drwxrwxr-x  6 crossley  cocoon   512 Sep 27 14:33 .svn
>>  2 -rw-rw-r--  1 crossley  cocoon   581 Sep 26 17:08 create-apidocs.sh
> 
> You don't need chmod/chown; permissions are looking fine as it is. But 
> when I try to run it, I get an error:
> 
>   vgritsenko@minotaur 
> /x1/www/cocoon.apache.org/2.2/core-modules/pipeline-api/1.0/apidocs $ 
> bash create-apidocs.sh
>   ----------------------------------------------------------------
>   Creating JavaDocs for cocoon-pipeline-api:1.0.0-RC2
>   create-apidocs.sh: line 9: syntax error near unexpected token `else'
>   create-apidocs.sh: line 9: `else'
> 
> 
> When I fixed both if/then/else:
> 
>   if [ ! -f $f ]
>   then
>     wget --header "User-Agent: Mozilla/5.0 Firefox/2.0.0.7" 
> http://repo1.maven.org/maven2/$jd
>     dl=1
>   fi

This seems to be subtle difference between shell script interpreters:

find . -name "create-apidocs.sh" | grep apidocs | xargs sh

works fine without having to change the if/then/else syntax.

But now I run into another problem: When I use the find/xargs command, the 
working directory is the directory where I entered this command and not the 
directory where the create-apidocs.sh script is located. Is there a way to set 
the working directory the way I have expected it?

-- 
Reinhard Pötz           Independent Consultant, Trainer & (IT)-Coach 

{Software Engineering, Open Source, Web Applications, Apache Cocoon}

                                        web(log): http://www.poetz.cc
--------------------------------------------------------------------

Mime
View raw message