Skip to content

Commit 1ac2b47

Browse files
committed
Fix warnings from shellcheck v0.3.3 (on TravisCI).
There were the following complaints: src/main/scripts/ci/check-build-and-verify.sh:56:53: note: fgrep is non-standard and deprecated. Use grep -F instead. [SC2197] src/main/scripts/ci/check-build-and-verify.sh:57:53: note: fgrep is non-standard and deprecated. Use grep -F instead. [SC2197] src/main/scripts/ci/check-build-and-verify.sh:58:54: note: egrep is non-standard and deprecated. Use grep -E instead. [SC2196] src/main/scripts/ci/check-build-and-verify.sh:254:224: note: fgrep is non-standard and deprecated. Use grep -F instead. [SC2197] src/main/scripts/ci/common.sh:28:2: note: egrep is non-standard and deprecated. Use grep -E instead. [SC2196]
1 parent 6d3bb4e commit 1ac2b47

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/main/scripts/ci/check-build-and-verify.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ if [ "$RUN_ONLY_INTEGRATION_TESTS" = 'no' ]; then
5353
MODIFIED_FILES="$(git --no-pager diff --name-only "$TRAVIS_COMMIT_RANGE" -- 2>/dev/null || :)"
5454

5555
if [ -n "$MODIFIED_FILES" ]; then
56-
AFFECTS_POM_XML="$(echo "$MODIFIED_FILES" | fgrep -xq 'pom.xml' || echo 'no')"
57-
AFFECTS_TRAVIS_CFG="$(echo "$MODIFIED_FILES" | fgrep -xq '.travis.yml' || echo 'no')"
58-
AFFECTS_CS_CFG="$(echo "$MODIFIED_FILES" | egrep -q '(checkstyle\.xml|checkstyle-suppressions\.xml)$' || echo 'no')"
56+
AFFECTS_POM_XML="$(echo "$MODIFIED_FILES" | grep -Fxq 'pom.xml' || echo 'no')"
57+
AFFECTS_TRAVIS_CFG="$(echo "$MODIFIED_FILES" | grep -Fxq '.travis.yml' || echo 'no')"
58+
AFFECTS_CS_CFG="$(echo "$MODIFIED_FILES" | grep -Eq '(checkstyle\.xml|checkstyle-suppressions\.xml)$' || echo 'no')"
5959
AFFECTS_FB_CFG="$(echo "$MODIFIED_FILES" | grep -q 'findbugs-filter\.xml$' || echo 'no')"
6060
AFFECTS_PMD_XML="$(echo "$MODIFIED_FILES" | grep -q 'pmd\.xml$' || echo 'no')"
6161
AFFECTS_JS_FILES="$(echo "$MODIFIED_FILES" | grep -q '\.js$' || echo 'no')"
@@ -253,6 +253,6 @@ fi
253253

254254
rm -f cs.log pmd.log license.log pom.log bootlint.log rflint.log shellcheck.log jasmine.log validator.log enforcer.log test.log codenarc.log findbugs.log verify-raw.log verify.log danger.log
255255

256-
if echo "$CS_STATUS$PMD_STATUS$LICENSE_STATUS$POM_STATUS$BOOTLINT_STATUS$RFLINT_STATUS$SHELLCHECK_STATUS$JASMINE_STATUS$HTML_STATUS$ENFORCER_STATUS$TEST_STATUS$CODENARC_STATUS$FINDBUGS_STATUS$VERIFY_STATUS$DANGER_STATUS" | fgrep -qs 'fail'; then
256+
if echo "$CS_STATUS$PMD_STATUS$LICENSE_STATUS$POM_STATUS$BOOTLINT_STATUS$RFLINT_STATUS$SHELLCHECK_STATUS$JASMINE_STATUS$HTML_STATUS$ENFORCER_STATUS$TEST_STATUS$CODENARC_STATUS$FINDBUGS_STATUS$VERIFY_STATUS$DANGER_STATUS" | grep -Fqs 'fail'; then
257257
exit 1
258258
fi

src/main/scripts/ci/common.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@ print_log() {
2525
echo
2626
printf "=====> \033[1;33m%s\033[0m\n" "$msg"
2727
echo
28-
egrep -v '^\[INFO\] Download(ing|ed):' "$log_file" || :
28+
grep -Ev '^\[INFO\] Download(ing|ed):' "$log_file" || :
2929
}

0 commit comments

Comments
 (0)