Found by checkbashisms(1) as "unsafe echo with backslash". Some shells don't expand embedded \n in a string by default,
which broke the build on systems like ArchLinux or Alpine where /bin/sh points to those shells because the generated .lo
file contained just a single line instead of two.
Thanks to @JustArchi for researching this on the Mono Gitter channel, it made fixing the issue a lot easier!
file=$1; shift
filename=`basename $file`
LOFILE=$file.lo
+ echo "$HEADER" > $LOFILE
if [ "$STATIC" = "static" ]; then
- echo "$HEADER\nnon_pic_object='$filename'" > $LOFILE
+ echo "non_pic_object='$filename'" >> $LOFILE
else
- echo "$HEADER\npic_object='$filename'" > $LOFILE
+ echo "pic_object='$filename'" >> $LOFILE
fi
echo "$DIR/$file " >> $FILELIST
echo "$DIR/$LOFILE " >> $LOFILELIST