fi
}
+lc_run() {
+ LANG=C LC_ALL=C "$@"
+}
+
valgrind=""
skeleton=0
keep_tmp_files=0
# filename (dot short* (long arg?)*)? ext
# must keep to POSIX standard: no syntactic sugar like +,?, etc.
# if you change this regexp, try it with 'sed --posix'
- local switches=`basename "$x" | LC_ALL=C sed \
+ local switches=`basename "$x" | lc_run sed \
-e 's/^[^.]*\.re$//g' \
-e 's/^[^.]*\.\(.*\)\.re$/\1/g' \
-e 's/^\([^-]\)/-\1/' \
$valgrind $wine ../../$re2c $switches "$outx" 2>"$outc.stderr" 1>&2
# paste all files dropped by re2c into output file
rm "$outx" && find . -type f \
- | sort \
+ | lc_run sort \
| xargs cat \
- | LC_ALL=C sed -e 's,/\* Generated by re2c .*\*/,/\* Generated by re2c \*/,g' \
+ | lc_run sed -e 's,/\* Generated by re2c .*\*/,/\* Generated by re2c \*/,g' \
>> "../$outc"
# cleanup sandbox
cd .. \