Trying to cross-build a snapshot fails when there is no todos binary:
echo '@setlocal enabledelayedexpansion && python -x "%~f0" %* & exit /b !ERRORLEVEL!' | \
cat - /home/sdcc-builder/build/sdcc-build/build/i686-w64-mingw32/sdcc/sdcc/bin/as2gbmap | \
todos > /home/sdcc-builder/build/sdcc-build/build/i686-w64-mingw32/sdcc/sdcc/bin/as2gbmap.cmd && \
rm /home/sdcc-builder/build/sdcc-build/build/i686-w64-mingw32/sdcc/sdcc/bin/as2gbmap
/bin/sh: 3: todos: not found
To someone not familiar with bash, this error message is not that clear. Did something go wrong with python? What is that "todos" (looks like some todo list)?
On debian, todos is a binary in the tofrodos package.
todos (to DOS) is the utility from tofrodos (to & from DOS) with DOS being MS-DOS or some such. It is used here to create the Windows .cmd batch file. It basically replaces every LF by CR/LF. An alternative is unix2dos.
But this whole line looks like a difficult way to create that file IMHO. Why echo, then cat? And why not insert an escaped \r\n in the appropriate place?