summaryrefslogtreecommitdiffstats
path: root/eshtrans/main.esh
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2016-02-28 01:47:19 (EST)
committer P. J. McDermott <pj@pehjota.net>2016-02-28 01:47:19 (EST)
commit58fded07a19e6100e307bba9de8e72854b57f1c4 (patch)
tree5418804d8f548cf59da65900198633fbfc16518b /eshtrans/main.esh
parent9868dcf4746ff021b7de95c7eab7cc8baa3cd616 (diff)
parent5ee168e734cc0d91e171f22e1269825df7d3cdfa (diff)
downloadeggshell-58fded07a19e6100e307bba9de8e72854b57f1c4.zip
eggshell-58fded07a19e6100e307bba9de8e72854b57f1c4.tar.gz
eggshell-58fded07a19e6100e307bba9de8e72854b57f1c4.tar.bz2
Merge branch 'feature/no-dd-lexer'
Diffstat (limited to 'eshtrans/main.esh')
-rw-r--r--eshtrans/main.esh8
1 files changed, 6 insertions, 2 deletions
diff --git a/eshtrans/main.esh b/eshtrans/main.esh
index 7e0cb8c..ac3895e 100644
--- a/eshtrans/main.esh
+++ b/eshtrans/main.esh
@@ -88,9 +88,13 @@ main()
fi
input="${1}"
if [ "x${output}" = 'x-' ]; then
- sh_codegen "$(esh_parse "${input}" <"${input}")"
+ contents="$(cat "${input}"; printf '.')"
+ contents="${contents%.}"
+ sh_codegen "$(esh_parse "${input}" "${contents}")"
else
- sh_codegen "$(esh_parse "${input}" <"${input}")" \
+ contents="$(cat "${input}"; printf '.')"
+ contents="${contents%.}"
+ sh_codegen "$(esh_parse "${input}" "${contents}")" \
>"${output}"
fi
fi