From c18112a890bd884424622354677fbfb82bbe8b65 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Wed, 13 Mar 2019 17:23:56 -0400 Subject: Eliminate -a and -o options of [ commands POSIX marks these as obsolescent. --- (limited to 'lib/changelog.sh') diff --git a/lib/changelog.sh b/lib/changelog.sh index c42c769..af3255e 100644 --- a/lib/changelog.sh +++ b/lib/changelog.sh @@ -97,8 +97,9 @@ ob_parse_changelog() fi ;; [!\ ]*) - if [ x"${expect}" != x'first_heading' -a \ - x"${expect}" != x'next_or_eof' ]; then + if [ x"${expect}" != x'first_heading' ] && \ + [ x"${expect}" != \ + x'next_or_eof' ]; then _ob_parse_changelog_error "${file}" "${line_nr}" \ 'changelog_found_heading' \ "$(_ob_get_changelog_expect_str "${expect}")" @@ -108,9 +109,11 @@ ob_parse_changelog() distribution="${line_##*) }" line_="${line_%) *}" version="${line_}" - if [ -z "${source}" -o -z "${distribution}" -o \ - -z "${version}" -o \ - "${version% *}" != "${version}" ]; then + if [ -z "${source}" ] || \ + [ -z "${distribution}" ] || \ + [ -z "${version}" ] || \ + [ "${version% *}" != \ + "${version}" ]; then _ob_parse_changelog_error "${file}" "${line_nr}" \ 'changelog_bad_heading' source='' @@ -142,8 +145,9 @@ ob_parse_changelog() line="${line# -- }" maintainer="${line%% *}" date="${line#* }" - if [ -z "${maintainer}" -o -z "${date}" -o \ - "${maintainer}" = "${date}" ]; then + if [ -z "${maintainer}" ] || [ -z "${date}" ] || + [ "${maintainer}" = "${date}" ] + then _ob_parse_changelog_error "${file}" "${line_nr}" \ 'changelog_bad_trailer' maintainer='' @@ -162,8 +166,9 @@ ob_parse_changelog() 'changelog_bad_trailer' ;; ' '*) - if [ x"${expect}" != x'start_changes' -a \ - x"${expect}" != x'changes_or_trailer' ]; then + if [ x"${expect}" != x'start_changes' ] && \ + [ x"${expect}" != \ + x'changes_or_trailer' ]; then _ob_parse_changelog_error "${file}" "${line_nr}" \ 'changelog_found_change' \ "$(_ob_get_changelog_expect_str "${expect}")" -- cgit v0.9.1