summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2019-03-18 14:18:18 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2019-03-18 14:18:18 (EDT)
commit738d5e1603ffe1a9ce099db63ffcc6d1428ab3e4 (patch)
tree2d91ab63780ed8a1e3fdcf71ebef9c636a0b7fbb
parent8724e63b4e6b5b692e524d666c02e6dc745451c9 (diff)
ob_parse_changelog(): Wrap long lines
Wow this is ugly.
-rw-r--r--lib/changelog.sh59
1 files changed, 38 insertions, 21 deletions
diff --git a/lib/changelog.sh b/lib/changelog.sh
index c749b15..e3d45d1 100644
--- a/lib/changelog.sh
+++ b/lib/changelog.sh
@@ -88,21 +88,27 @@ ob_parse_changelog()
changes="${changes}${OB_LF}${line}"
elif [ x"${expect}" = x'next_or_eof' ]; then
:
- elif [ x"${expect}" != x'changes_or_trailer' ]; then
- _ob_parse_changelog_error "${file}" "${line_nr}" \
+ elif [ x"${expect}" != x'changes_or_trailer' ]
+ then
+ _ob_parse_changelog_error "${file}" \
+ "${line_nr}" \
'changelog_found_blank_line' \
- "$(_ob_get_changelog_expect_str "${expect}")"
+ "$(_ob_get_changelog_expect_str\
+ "${expect}")"
else
- blank_lines="${blank_lines}${OB_LF}${line}"
+ blank_lines="${blank_lines}${OB_LF}"
+ blank_lines="${blank_lines}${line}"
fi
;;
[!\ ]*)
if [ x"${expect}" != x'first_heading' ] && \
[ x"${expect}" != \
x'next_or_eof' ]; then
- _ob_parse_changelog_error "${file}" "${line_nr}" \
+ _ob_parse_changelog_error "${file}" \
+ "${line_nr}" \
'changelog_found_heading' \
- "$(_ob_get_changelog_expect_str "${expect}")"
+ "$(_ob_get_changelog_expect_str\
+ "${expect}")"
fi
source="${line%% (*}"
line_="${line#* (}"
@@ -114,22 +120,26 @@ ob_parse_changelog()
[ -z "${version}" ] || \
[ x"${version% *}" != \
x"${version}" ]; then
- _ob_parse_changelog_error "${file}" "${line_nr}" \
+ _ob_parse_changelog_error "${file}" \
+ "${line_nr}" \
'changelog_bad_heading'
source=''
version=''
distribution=''
changes=''
else
- if ! ob_validate_source_name "${source}"; then
+ if ! ob_validate_source_name "${source}"
+ then
_ob_parse_changelog_error \
"${file}" "${line_nr}" \
- 'changelog_bad_source' "${source}"
+ 'changelog_bad_source' \
+ "${source}"
fi
if ! ob_parse_version "${version}"; then
_ob_parse_changelog_error \
"${file}" "${line_nr}" \
- 'changelog_bad_source_version' "${version}"
+ "changelog_bad_sourc$(:\
+ )e_version" "${version}"
fi
changes="${line}"
fi
@@ -137,10 +147,13 @@ ob_parse_changelog()
blank_lines=''
;;
' -- '*)
- if [ x"${expect}" != x'changes_or_trailer' ]; then
- _ob_parse_changelog_error "${file}" "${line_nr}" \
+ if [ x"${expect}" != x'changes_or_trailer' ]
+ then
+ _ob_parse_changelog_error "${file}" \
+ "${line_nr}" \
'changelog_found_trailer' \
- "$(_ob_get_changelog_expect_str "${expect}")"
+ "$(_ob_get_changelog_expect_str\
+ "${expect}")"
fi
line="${line# -- }"
maintainer="${line%% *}"
@@ -148,7 +161,8 @@ ob_parse_changelog()
if [ -z "${maintainer}" ] || [ -z "${date}" ] ||
[ x"${maintainer}" = \
x"${date}" ]; then
- _ob_parse_changelog_error "${file}" "${line_nr}" \
+ _ob_parse_changelog_error "${file}" \
+ "${line_nr}" \
'changelog_bad_trailer'
maintainer=''
date=''
@@ -162,24 +176,27 @@ ob_parse_changelog()
blank_lines=''
;;
' --'*)
- _ob_parse_changelog_error "${file}" "${line_nr}" \
- 'changelog_bad_trailer'
+ _ob_parse_changelog_error "${file}" \
+ "${line_nr}" 'changelog_bad_trailer'
;;
' '*)
if [ x"${expect}" != x'start_changes' ] && \
[ x"${expect}" != \
x'changes_or_trailer' ]; then
- _ob_parse_changelog_error "${file}" "${line_nr}" \
+ _ob_parse_changelog_error "${file}" \
+ "${line_nr}" \
'changelog_found_change' \
- "$(_ob_get_changelog_expect_str "${expect}")"
+ "$(_ob_get_changelog_expect_str\
+ "${expect}")"
fi
- changes="${changes}${OB_LF}${blank_lines}${line}"
+ changes="${changes}${OB_LF}${blank_lines}"
+ changes="${changes}${line}"
expect='changes_or_trailer'
blank_lines=''
;;
*)
- _ob_parse_changelog_error "${file}" "${line_nr}" \
- 'changelog_bad_line'
+ _ob_parse_changelog_error "${file}" \
+ "${line_nr}" 'changelog_bad_line'
blank_lines=''
;;
esac