[jboss-dev] Symlinks and JBoss AS ./bin/*.sh scripts

David M. Lloyd david.lloyd at redhat.com
Sun Nov 28 17:03:33 EST 2010


On 11/28/2010 10:18 AM, Emmanuel Bernard wrote:
> Hey guys,
> Over the week-end I've packaged JBoss AS 6 into HomeBrew (a Mac OS X packaging system made of git and ruby).
> I've discovered that our scripts are not symlinks friendly and will fail (often not finding the jars).
>
> I've fixed the issue but I wanted to get a review of my work. Let me know if you thing there could be a problem, otherwise I'll apply them to SVN.
> [...]
>    ls=`ls -ld "$PRG"`
>    link=`expr "$ls" : '.*->  \(.*\)$'`

This is fragile I think.  It'd probably be better to use "readlink" 
instead, whose actual purpose is to read links.

-- 
- DML


More information about the jboss-development mailing list