betweenGo

Maven Assembly Convert Shell Scripts to use UNIX LF’s

by on May.09, 2008, under Cygwin, Eclipse, Maven, Perforce

In a previous post, Shell Scripts with Windows LF’s Fail in Latest Cygwin, I wrote about how to use Perforce to check out all files in UNIX format. However if you use Eclipse then this solution will not work because Eclipse always inserts Windows LF’s in any line you insert into a file leading to a mess with files that have both UNIX and Windows LF’s.

However if you happen to use Maven to generate / copy your shell scripts to their target directories you can take advantage of the lineEnding property in the Assembly Director. If you specify the lineEnding property to be “unix” then the outputted shell scripts will be in UNIX format. For example:

<file>
  <source>src/main/scripts/foo.sh</source>
  <outputDirectory>bin</outputDirectory>
  <lineEnding>unix</lineEnding>
</file>


Share

Related posts:

  1. Shell Scripts with Windows LF’s Fail in Latest Cygwin
  2. Cygwin Bash cannot execute DOS formatted scripts
  3. Maven Integration for Eclipse
  4. Cygwin Bash Scripts and Java
  5. Unable to start Cygwin shell from Windows command prompt

:, ,

Leave a Reply

 

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!