7 tsc_version=$(LC_ALL=C.UTF-8 tsc --version)
13 case "${tsc_version#Version }" in
20 files_json="${files_json}\"$f\", "
22 files_json="$files_json]"
24 our_tsconfig=".tsconfig.${out##*/}.json"
31 sed <"$tsconfig" >"$our_tsconfig" '/^ *"files":/ s#:.*#:'"$files_json"'#'
33 x tsc --outfile "$out.1.tmp" -p "$our_tsconfig" 2>&1 \
34 | perl -pe 's/\((\d+),(\d+)\):/:$1:$2:/' >&2
35 test "${PIPESTATUS[*]}" = "0 0"
37 sed <"$out.1.tmp" '/^[a-z]/,$d' > "$out".tmp
38 echo "// autogenerated from $@" >>"$out".tmp
39 sed <"$1" '/^[a-z]/,$d' >>"$out".tmp
40 sed -n <"$out.1.tmp" '/^[a-z]/,$p' >> "$out".tmp
42 mv -f "$out".tmp "$out"