Skip to content

Fix version.sh compatibility issues

Nimai Malle requested to merge nimai.malle/nxlog-ce:version_script_compat into master

On Mac OS X, version numbers were being generated with spaces in them and a linefeed at the end, causing compilation issues. These fixes should be compatible with other systems, and generate the correct version strings for Mac as well. wc -l needs whitespace trimmed, so added | tr -d ' ' The -n flag on echo isn't portable to many systems; switched to use printf instead, for no linefeed. The only question I have with this commit is what the sed s/M// was for? If I leave it in there, it adds a new-line character back in (on Mac at least) and there is no "M" that I could see. If that substitution is needed, the script will need further adaptation to assure no trailing new-line in the version string.

Merge request reports