diff options
-rw-r--r-- | lib/changelog.sh | 34 | ||||
-rw-r--r-- | lib/deps.sh | 6 | ||||
-rw-r--r-- | lib/load.sh | 2 |
3 files changed, 21 insertions, 21 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' diff --git a/lib/deps.sh b/lib/deps.sh index b59d69f..cc2d3b1 100644 --- a/lib/deps.sh +++ b/lib/deps.sh @@ -120,7 +120,7 @@ ob_reduce_deps() _obrd_orig_ifs _obrd_dep_and _obrd_dep_or \ _obrd_dep_list _obrd_dep_or_list _obrd_dep - _obrd_union=false + _obrd_union='false' while getopts 'a:u' _obrd_opt; do case "${_obrd_opt}" in @@ -128,7 +128,7 @@ ob_reduce_deps() _obrd_host_arch="${OPTARG}" ;; u) - _obrd_union=true + _obrd_union='true' ;; ?) _ob_return 125 @@ -138,7 +138,7 @@ ob_reduce_deps() done shift $(($OPTIND - 1)) - if [ "${#}" -eq 1 ]; then + if [ ${#} -eq 1 ]; then _obrd_deps="${1}" else _ob_return 125 diff --git a/lib/load.sh b/lib/load.sh index ee32e9b..bb11e23 100644 --- a/lib/load.sh +++ b/lib/load.sh @@ -28,7 +28,7 @@ ob_use() { _ob_local _obu_module - if [ "${#}" -eq 1 ]; then + if [ ${#} -eq 1 ]; then _obu_module="${1}" else _ob_return 125 |