summaryrefslogtreecommitdiff
path: root/dmd-wrapper
blob: e413f08352a33ddbf51ca14a7b4bd4260f151ad6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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"