summaryrefslogtreecommitdiffstats
path: root/eshtrans
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2016-02-28 23:29:30 (EST)
committer P. J. McDermott <pj@pehjota.net>2016-02-28 23:29:30 (EST)
commitef54a28f5211cca6d5bd2fc6ada2ae520ab985b7 (patch)
tree16cbe1b549288844d7772a2110fa6f2fb3c5206d /eshtrans
parent163eda3dc000b25f5c71146b6d4473825da0a5c2 (diff)
downloadeggshell-ef54a28f5211cca6d5bd2fc6ada2ae520ab985b7.zip
eggshell-ef54a28f5211cca6d5bd2fc6ada2ae520ab985b7.tar.gz
eggshell-ef54a28f5211cca6d5bd2fc6ada2ae520ab985b7.tar.bz2
eshtrans: Fix esh_parse() call when no -o option is given
Diffstat (limited to 'eshtrans')
-rw-r--r--eshtrans/main.esh4
1 files changed, 3 insertions, 1 deletions
diff --git a/eshtrans/main.esh b/eshtrans/main.esh
index ac3895e..1f3983d 100644
--- a/eshtrans/main.esh
+++ b/eshtrans/main.esh
@@ -78,7 +78,9 @@ main()
if [ "x${output}" = 'x' ]; then
for input in "${@}"; do
output="${input%.esh}.sh"
- sh_codegen "$(esh_parse "${input}" <"${input}")" \
+ contents="$(cat "${input}"; printf '.')"
+ contents="${contents%.}"
+ sh_codegen "$(esh_parse "${input}" "${contents}")" \
>"${output}"
done
else