diff options
Diffstat (limited to 'dmd-wrapper')
-rwxr-xr-x | dmd-wrapper | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/dmd-wrapper b/dmd-wrapper new file mode 100755 index 00000000..e413f083 --- /dev/null +++ b/dmd-wrapper @@ -0,0 +1,16 @@ +#!/bin/bash -eu + +# This script wraps DMD so we can get something which is capable of reading +# D code from stdin. + +temp_file=`mktemp` +mv "$temp_file" "$temp_file".d +temp_file="$temp_file".d + +trap "rm $temp_file" EXIT + +while read line; do + echo "$line" >> "$temp_file" +done + +dmd "$@" "$temp_file" |