summaryrefslogtreecommitdiffstats
path: root/lib/changelog.sh
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2019-03-13 17:23:56 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2019-03-13 17:23:56 (EDT)
commitc18112a890bd884424622354677fbfb82bbe8b65 (patch)
tree377096a6558c8f63363b25cd62b873b9e6f3ddf7 /lib/changelog.sh
parente6b04d9ffd8bef2482ab61957c138ae92527206d (diff)
Eliminate -a and -o options of [ commands
POSIX marks these as obsolescent.
Diffstat (limited to 'lib/changelog.sh')
-rw-r--r--lib/changelog.sh23
1 files changed, 14 insertions, 9 deletions
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}")"