diff options
-rw-r--r-- | lib/changelog.sh | 23 | ||||
-rw-r--r-- | lib/deps.sh | 4 | ||||
-rw-r--r-- | src/ob-installplatconf.sh | 2 | ||||
-rw-r--r-- | src/opkbuild.sh | 3 |
4 files changed, 19 insertions, 13 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}")" diff --git a/lib/deps.sh b/lib/deps.sh index 5af26ac..9ae63fe 100644 --- a/lib/deps.sh +++ b/lib/deps.sh @@ -172,9 +172,9 @@ ob_parse_dep() printf '%s' "${pkg}" [ -n "${archqual}" ] && printf ':%s' "${archqual}" [ -n "${ver}" ] && printf ' (%s %s)' "${rel}" "${ver}" - [ -z "${host_arch}" -a -n "${arches}" ] && \ + [ -z "${host_arch}" ] && [ -n "${arches}" ] && \ printf ' [%s]' "${arches}" - [ -z "${host_plat}" -a -n "${plats}" ] && \ + [ -z "${host_plat}" ] && [ -n "${plats}" ] && \ printf ' [%s]' "${plats}" printf '\n' diff --git a/src/ob-installplatconf.sh b/src/ob-installplatconf.sh index 4eac903..2caa5cf 100644 --- a/src/ob-installplatconf.sh +++ b/src/ob-installplatconf.sh @@ -30,7 +30,7 @@ copy_config() dest_base="${2}" while read -r src dest; do - if [ -z "${src}" -o -z "${dest}" ]; then + if [ -z "${src}" ] || [ -z "${dest}" ]; then ob_error "$(ob_get_msg 'bad_config_syntax')" "${list}" fi diff --git a/src/opkbuild.sh b/src/opkbuild.sh index affa6e2..7392317 100644 --- a/src/opkbuild.sh +++ b/src/opkbuild.sh @@ -394,7 +394,8 @@ main() setup_package || return 1 - if [ x"${opt_build}" = x'source' -o x"${opt_build}" = x'full' ]; then + if [ x"${opt_build}" = x'source' ] || [ x"${opt_build}" = x'full' ] + then build_source || return 1 fi |