summaryrefslogtreecommitdiffstats
path: root/lib/changelog.sh
diff options
context:
space:
mode:
Diffstat (limited to 'lib/changelog.sh')
-rw-r--r--lib/changelog.sh34
1 files changed, 17 insertions, 17 deletions
diff --git a/lib/changelog.sh b/lib/changelog.sh
index dbe580f..dedfa9a 100644
--- a/lib/changelog.sh
+++ b/lib/changelog.sh
@@ -59,18 +59,18 @@ oh_parse_changelog()
# Parsing logic based on that of dpkg.
_obpch_line_nr=0
- _obpch_expect=first_heading
+ _obpch_expect='first_heading'
_obpch_entries=0
while IFS= read _obpch_line; do
_obpch_line_nr=$(($_obpch_line_nr + 1))
if [ -z "${_obpch_line}" ]; then
- if [ "${_obpch_expect}" = start_changes ]; then
+ if [ "${_obpch_expect}" = 'start_changes' ]; then
OB_CHANGELOG_CHANGES="${OB_CHANGELOG_CHANGES}
${_obpch_line}"
- elif [ "${_obpch_expect}" = next_or_eof ]; then
+ elif [ "${_obpch_expect}" = 'next_or_eof' ]; then
:
- elif [ "${_obpch_expect}" != changes_or_trailer ]; then
+ elif [ "${_obpch_expect}" != 'changes_or_trailer' ]; then
_ob_parse_changelog_error "${_obpch_line_nr}" \
'changelog_found_blank_line' \
"$(_ob_get_changelog_expect_str "${_obpch_expect}")"
@@ -79,8 +79,8 @@ ${_obpch_line}"
${_obpch_line}"
fi
elif [ "${_obpch_line# }" = "${_obpch_line}" ]; then
- if [ "${_obpch_expect}" != first_heading -a \
- "${_obpch_expect}" != next_or_eof ]; then
+ if [ "${_obpch_expect}" != 'first_heading' -a \
+ "${_obpch_expect}" != 'next_or_eof' ]; then
_ob_parse_changelog_error "${_obpch_line_nr}" \
'changelog_found_heading' \
"$(_ob_get_changelog_expect_str "${_obpch_expect}")"
@@ -102,13 +102,13 @@ ${_obpch_line}"
else
echo "${_obpch_source}" | \
grep -E "${OB_SOURCE_RE}" >/dev/null 2>&1
- if [ "${?}" -ne 0 ]; then
+ if [ ${?} -ne 0 ]; then
_ob_parse_changelog_error "${_obpch_line_nr}" \
'changelog_bad_source' "${source}"
fi
echo "${_obpch_version}" | \
grep -E "${OB_SOURCE_VERSION_ID_RE}" >/dev/null 2>&1
- if [ "${?}" -ne 0 ]; then
+ if [ ${?} -ne 0 ]; then
_ob_parse_changelog_error "${_obpch_line_nr}" \
'changelog_bad_source_version' "${_obpch_version}"
fi
@@ -117,10 +117,10 @@ ${_obpch_line}"
OB_CHANGELOG_DISTRIBUTION="${_obpch_distribution}"
OB_CHANGELOG_CHANGES="${_obpch_line}"
fi
- _obpch_expect=start_changes
+ _obpch_expect='start_changes'
_obpch_blank_lines=
elif [ "${_obpch_line# -- }" != "${_obpch_line}" ]; then
- if [ "${_obpch_expect}" != changes_or_trailer ]; then
+ if [ "${_obpch_expect}" != 'changes_or_trailer' ]; then
_ob_parse_changelog_error "${_obpch_line_nr}" \
'changelog_found_trailer' \
"$(_ob_get_changelog_expect_str "${_obpch_expect}")"
@@ -144,21 +144,21 @@ ${_obpch_line}"
return ${?}
fi
fi
- _obpch_expect=next_or_eof
+ _obpch_expect='next_or_eof'
_obpch_blank_lines=
elif [ "${_obpch_line# --}" != "${_obpch_line}" ]; then
_ob_parse_changelog_error "${_obpch_line_nr}" \
'changelog_bad_trailer'
elif [ "${_obpch_line## }" != "${_obpch_line}" ]; then
- if [ "${_obpch_expect}" != start_changes -a \
- "${_obpch_expect}" != changes_or_trailer ]; then
+ if [ "${_obpch_expect}" != 'start_changes' -a \
+ "${_obpch_expect}" != 'changes_or_trailer' ]; then
_ob_parse_changelog_error "${_obpch_line_nr}" \
'changelog_found_change' \
"$(_ob_get_changelog_expect_str "${_obpch_expect}")"
fi
OB_CHANGELOG_CHANGES="${OB_CHANGELOG_CHANGES}
${_obpch_blank_lines}${_obpch_line}"
- _obpch_expect=changes_or_trailer
+ _obpch_expect='changes_or_trailer'
_obpch_blank_lines=
else
_ob_parse_changelog_error "${_obpch_line_nr}" \
@@ -167,7 +167,7 @@ ${_obpch_blank_lines}${_obpch_line}"
fi
done <"${_obpch_file}"
- if [ "${_obpch_expect}" != next_or_eof ]; then
+ if [ "${_obpch_expect}" != 'next_or_eof' ]; then
_ob_parse_changelog_error "${_obpch_line_nr}" \
'changelog_found_eof' \
"$(_ob_get_changelog_expect_str "${_obpch_expect}")"
@@ -187,8 +187,8 @@ _ob_parse_changelog_error()
_obpche_msg_id="${3}"
shift 3
- _obpche_file_info=$(printf '%20s(l%d):' "${_obpche_file}" \
- "${_obpche_line_nr}")
+ _obpche_file_info="$(printf '%20s(l%d):' "${_obpche_file}" \
+ "${_obpche_line_nr}")"
_obpche_orig_text_domain="$(ob_get_text_domain)"
ob_set_text_domain 'libopkbuild.1'