I have been wresting with the oddest shell script problem Ive ever seen:
the castor scripts (*.sh) give the error ': command not found' for any
blank line in a script.

this is what happened for me when i tried to build castor out of the box.

[donp@amidala src]$ tar zxf /tmp/castor-0.9.3-src.tgz
[donp@amidala src]$ cd castor-0.9.3/
[donp@amidala castor-0.9.3]$ sh build.sh
: command not found
: command not found
build.sh: line 22: syntax error: unexpected end of file

upon inspection, the shell script looked fine.

after a couple days of being stumped, it hit me. when editing this file,
VI has been in 'dos' mode. Which means the files are using CRLF for an end
of line marker instead of LF. This is messing up all the shell scripts in
the tar ball. Its the literal CR character that bash is reporting as
command not found, since there is no program on my system with a filename
of <CR>.

You can cleanse the scripts like so:
find . -name \*.sh -exec perl -i -n -e 's/\015//;print' {} \;

to the castor build maintainer: please fix the end of line character in
the official tarball.

Thank You
Don Park
-- 
** Home web site: http://klickitat.yi.org
** BeeHive Games, Multiplayer Bluetooth PDA Gaming  http://beehivegames.com
** irc: irc.openprojects.net nick: don-o channels: #palmchat,#java

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to