mirror of
https://github.com/Mercury-Language/mercury.git
synced 2025-12-08 18:34:00 +00:00
16 lines
788 B
Bash
Executable File
16 lines
788 B
Bash
Executable File
#!/bin/sh
|
|
# vim: ts=4 sw=4 wm=0
|
|
# Ensure that all divider lines (lines that match the regular expression %--*%)
|
|
# in Mercury source files are of two standard lengths, one short, one long.
|
|
# The long lines are intended to separate major sections of a file, while
|
|
# the short ones separate just the different parts of a section.
|
|
|
|
for f in "$@"
|
|
do
|
|
echo "${f}"
|
|
tmpf="${f}.tmp"
|
|
sed -e '/^%------------------------*%$/s//%===========================================================================%/' -e '/^%--*%$/s//%---------------------%/' < "${f}" > "${tmpf}"
|
|
sed -e 's/%===========================================================================%/%---------------------------------------------------------------------------%/' < "${tmpf}" > "${f}"
|
|
/bin/rm ${tmpf}
|
|
done
|