mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-22 23:59:34 -05:00
ITS#8731 Improve sample processing script
This commit is contained in:
parent
47102fcced
commit
4a136c7651
1 changed files with 5 additions and 5 deletions
|
|
@ -10,16 +10,16 @@ SPATCH_OPTS=( --macro-file-builtins "$PATCH_DIR/macros.h" )
|
||||||
|
|
||||||
SED_TRANSFORMATIONS=()
|
SED_TRANSFORMATIONS=()
|
||||||
|
|
||||||
# strip trailing whitespace copied from source on affected lines
|
|
||||||
SED_TRANSFORMATIONS+=( -e 's/^\(+.*\)\s\+$/\1/' )
|
|
||||||
|
|
||||||
# split out multipart strings back to original form (one per line)
|
# split out multipart strings back to original form (one per line)
|
||||||
SED_TRANSFORMATIONS+=( -e 's/^\(+\s*\)\(.*"\) \(".*\)"$/\1\2\n+\1\3/' )
|
SED_TRANSFORMATIONS+=( -e 's/^\(+\s*\)\(.*"\) \(".*\)"$/\1\2\n+\1\3/' )
|
||||||
|
|
||||||
# re-add whitespace around parentheses
|
# re-add whitespace around parentheses
|
||||||
SED_TRANSFORMATIONS+=( -e 's/^\(+.*Debug[0-3]\?(\)\s*$/\1 /' )
|
SED_TRANSFORMATIONS+=( -e 's/^\(+.*Debug[0-3]\?(\)\s*/\1 /' )
|
||||||
SED_TRANSFORMATIONS+=( -e 's/^\(+.*[^ ]\));$/\1 );/' )
|
SED_TRANSFORMATIONS+=( -e 's/^\(+.*[^ ]\));$/\1 );/' )
|
||||||
|
|
||||||
|
# strip trailing whitespace copied from source on affected lines
|
||||||
|
SED_TRANSFORMATIONS+=( -e 's/^\(+.*\)\s\+$/\1/' )
|
||||||
|
|
||||||
# fix whitespace errors in source we touch
|
# fix whitespace errors in source we touch
|
||||||
SED_TRANSFORMATIONS+=( -e 's/^\(+.*\) \t/\1\t\t/' )
|
SED_TRANSFORMATIONS+=( -e 's/^\(+.*\) \t/\1\t\t/' )
|
||||||
SED_TRANSFORMATIONS+=( -e 's/^\(+\t*\) \{1,3\}\t/\1\t/' )
|
SED_TRANSFORMATIONS+=( -e 's/^\(+\t*\) \{1,3\}\t/\1\t/' )
|
||||||
|
|
@ -29,7 +29,7 @@ normalise() {
|
||||||
shift
|
shift
|
||||||
|
|
||||||
# iterate until we've reached fixpoint
|
# iterate until we've reached fixpoint
|
||||||
while ! cmp "$patch" "${patch}.new"; do
|
while ! cmp "$patch" "${patch}.new" 2>/dev/null; do
|
||||||
if [ -e "${patch}.new" ]; then
|
if [ -e "${patch}.new" ]; then
|
||||||
mv -- "${patch}.new" "$patch"
|
mv -- "${patch}.new" "$patch"
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue