libcruft-util/build-aux/wine-crlf.sh
Danny Robson b814c83e21 test/json: run tests through a line wine/crlf wrapper
unit tests rely on AWKs record seperator being LF which presents issues
when running windows tests. rather than modify the tap-driver provided
by autotools (which would be extremely annoying to maintain) we run all
tests through wine-crlf.sh which will perform line ending transforms as
required.

it's a pretty braindead script, so don't do anything terrifically
extreme under it.
2016-04-27 17:13:36 +10:00

17 lines
177 B
Bash
Executable File

#!/bin/sh
case "$1" in
*.exe)
OUTPUT="$(/usr/bin/env wine $@)"
STATUS=$?
echo "$OUTPUT" | sed 's/\r$//'
exit $STATUS
;;
*)
$@
exit $?
;;
esac