[Mono-dev] Known issue with xbuild and line-feeds in Cygwin?

Bob Summerwill bob at summerwill.net
Tue Aug 26 17:57:19 UTC 2014


I have inherited a shell script with a horrible line of sed in it which OS
X doesn't like, to deal with line-end issues in xbuild under Cygwin ...


# Check if we are running under Windows(cygwin) OR *nix, and use xbuild OR
MSBuild.exe accordingly
set isRunningCygwin=`uname | grep CYGWIN`
if ( $isRunningCygwin == '' ) then
    # This LINUX machine should have Mono and friends (xbuild) installed
    set builder=`which xbuild`
else
    # This WINDOWS machine should have .Net Framework installed
    set builder=`find /cygdrive/c/Windows/Microsoft.NET/Framework/v4.0*
-name MSBuild.exe`
endif

if ($builder == '') then
    echo "Unable to find 'xbuild' (Linux) OR 'MSBuild.exe' (Windows) to
build Solution, bailing!"
    exit -1
endif

# Switch directories to get around silly MSBuild vs Cygwin issues
cd ../LucyServer
sed -i '/^$/d' ${LucyServerSolution}
$builder ${LucyServerSolution} /verbosity:quiet /p:Configuration=Release
cd ../Scripts


Is this something which is familiar to other xbuild users?

I  _think_ that the sed is trying to replace Windows-style line-endings in
the SLN with Linux-style line-endings, though that shouldn't be necessary.

I think there is a bug report in here, when I can figure out exactly what
is going wrong.

On Mac OSX the sed line barfs and fails.    Without the sed line the Cygwin
build just silently doesn't build anything.


Cheers,
Bob


-- 
bob at summerwill.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-devel-list/attachments/20140826/45aa3c06/attachment.html>


More information about the Mono-devel-list mailing list