File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
main/resources/org/eolang/hone/scaffolding Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 6363 <configuration >
6464 <image >larger-hone:local</image >
6565 <rules >none</rules >
66+ <threads >1</threads >
67+ <timeout >10</timeout >
6668 </configuration >
6769 <executions >
6870 <execution >
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ function rewrite {
5656 for rule in " ${rules[@]} " ; do
5757 m=$( basename " ${rule} " .yml)
5858 pos=$(( pos + 1 ))
59- t=" ${pho} .${pos} "
59+ t=" ${pho} .$( printf ' %002d ' " $ {pos}" ) "
6060 phino rewrite " ${phinopts[@]} " --max-cycles " ${HONE_MAX_CYCLES} " --max-depth " ${HONE_MAX_DEPTH} " --sweet --rule " ${rule} " " ${pho} " > " ${t} "
6161 if cmp -s " ${pho} " " ${t} " ; then
6262 verbose " No changes made by '${m} ' to $( basename " ${t} " ) "
@@ -98,7 +98,7 @@ function rewrite_with_timeout {
9898 start=$( date ' +%s.%N' )
9999 if ! timeout " ${HONE_TIMEOUT} " " ${0} " rewrite " $@ " ; then
100100 sec=$( perl -E " say int($( date ' +%s.%N' ) - ${start} )" )
101- if [ " ${sec} " == 0 ]; then
101+ if [ " ${sec} " -eq 0 ]; then
102102 echo " Failure in ${idx} $( basename " ${xi} " ) ($( du -sh " ${xi} " | cut -f1) )"
103103 exit 1
104104 fi
@@ -181,8 +181,9 @@ mkdir -p "${PARALLEL_HOME}"
181181parallel --record-env
182182echo " Starting to rewrite ${total} file(s) in ${threads} thread(s)..."
183183start=$( date ' +%s.%N' )
184- parallel --retries=0 " --joblog=${TARGET} /hone- tasks.log" --will-cite \
184+ parallel --retries=0 " --joblog=${PARALLEL_HOME} / tasks.log" --will-cite \
185185 " --max-procs=${threads} " \
186- --env _ \
186+ " --tmpdir=${PARALLEL_HOME} /tmp" \
187+ --env _ --plain \
187188 --halt-on-error=now,fail=1 --halt=now,fail=1 < " ${tasks} "
188189echo " Finished rewriting ${total} file(s) in $( perl -E " say int($( date ' +%s.%N' ) - ${start} )" ) seconds"
You can’t perform that action at this time.
0 commit comments