Skip to content

Commit eb08ad5

Browse files
committed
dist/tools: fix shellcheck warnings in pr_check script
1 parent e0182da commit eb08ad5

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

dist/tools/pr_check/check.sh

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,19 @@
77
# directory for more details.
88
#
99

10+
# shellcheck source=/dev/null
1011
. "$(dirname "$0")/../ci/github_annotate.sh"
1112

12-
: "${RIOTBASE:=$(cd $(dirname $0)/../../../; pwd)}"
13-
cd $RIOTBASE
13+
: "${RIOTBASE:="$(cd "$(dirname "$0")"/../../../ || exit; pwd)"}"
14+
cd "$RIOTBASE" || exit
1415

1516
: "${RIOTTOOLS:=${RIOTBASE}/dist/tools}"
1617

1718
EXIT_CODE=0
1819

1920
github_annotate_setup
2021

21-
if tput colors &> /dev/null && [ $(tput colors) -ge 8 ]; then
22+
if tput colors &> /dev/null && [ "$(tput colors)" -ge 8 ]; then
2223
CERROR="\e[1;31m"
2324
CRESET="\e[0m"
2425
else
@@ -40,12 +41,12 @@ keyword_filter() {
4041
-e "^ [0-9a-f]\+ .\{0,2\}Update"
4142
}
4243

43-
SQUASH_COMMITS="$(git log $(git merge-base HEAD "${RIOT_MASTER}")...HEAD --pretty=format:" %h %s" | \
44+
SQUASH_COMMITS="$(git log "$(git merge-base HEAD "${RIOT_MASTER}")"...HEAD --pretty=format:" %h %s" | \
4445
keyword_filter)"
4546

4647
if [ -n "${SQUASH_COMMITS}" ]; then
4748
if github_annotate_is_on; then
48-
echo "${SQUASH_COMMITS}" | while read commit; do
49+
echo "${SQUASH_COMMITS}" | while read -r commit; do
4950
ANNOTATION="Commit needs to be squashed: \"${commit}\""
5051
ANNOTATION="${ANNOTATION}\n\nPLEASE ONLY SQUASH WHEN ASKED BY A "
5152
ANNOTATION="${ANNOTATION}MAINTAINER!"

0 commit comments

Comments
 (0)