Commit 0558a731 authored by Andreas Klebinger's avatar Andreas Klebinger

Properly escape backslashes passed to ghci

parent 62c4dac3
......@@ -43,4 +43,5 @@ set -x
# We could use perl/python for this. But it's not much faster than ghci and adds additional dependencies.
# We could use bash directly. But it's incredibly slow on windows.
# So instead we just use ghci which is fast enough for this purpose.
$HC --interactive -e "readFile \"${src}/awards.out_template\" >>= \s -> writeFile \"${output}/awards.stdout\" (concat . replicate ${REPS} $ s)"
# ${src//\\/\\\\} => // : Replace all patterns of a single backslash with double backslashes
$HC --interactive -e "readFile \"${src//\\/\\\\}/awards.out_template\" >>= \\s -> writeFile \"${output//\\/\\\\}/awards.stdout\" (concat . replicate ${REPS} $ s)"
......@@ -40,5 +40,5 @@ set -x
# We could use perl/python for this. But it's not much faster than ghci and adds additional dependencies.
# We could use bash directly. But it's incredibly slow on windows.
# So instead we just use ghci which is fast enough for this purpose.
$HC --interactive -e "readFile \"${src}/banner.stdout.template\" >>= \s -> writeFile \"${output}/banner.stdout\" (concat . replicate ${MODE_ARGS} $ s)"
$HC --interactive -e "readFile \"${src}/banner.stdin.template\" >>= \s -> writeFile \"${output}/banner.stdin\" (concat . replicate ${MODE_ARGS} $ s)"
$HC --interactive -e "readFile \"${src//\\/\\\\}/banner.stdout.template\" >>= \\s -> writeFile \"${output//\\/\\\\}/banner.stdout\" (concat . replicate ${MODE_ARGS} $ s)"
$HC --interactive -e "readFile \"${src//\\/\\\\}/banner.stdin.template\" >>= \\s -> writeFile \"${output//\\/\\\\}/banner.stdin\" (concat . replicate ${MODE_ARGS} $ s)"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment