Skip to content

Commit 368ec56

Browse files
committed
FAB-15675 Fix issues flagged by shellcheck
For check_license.sh & metrics_doc.sh Need to check with shellcheck 0.6.0 Change-Id: I39c60cf4a9326e9fa5f74159a9f9a199bb77d1fe Signed-off-by: Atsushi Neki <atsushin@fast.au.fujitsu.com>
1 parent f2cc88c commit 368ec56

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

scripts/check_license.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
# SPDX-License-Identifier: Apache-2.0
66
#
77

8-
source "$(cd $(dirname "$0") && pwd)/functions.sh"
8+
# shellcheck source=/dev/null
9+
source "$(cd "$(dirname "$0")" && pwd)/functions.sh"
910

1011
CHECK=$(git diff --name-only --diff-filter=ACMRTUXB HEAD | tr '\n' ' ')
1112
if [[ -z "$CHECK" ]]; then

scripts/metrics_doc.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ case "$1" in
1414
# check if the metrics documentation is up to date with the metrics
1515
# options in the tree
1616
"check")
17-
if [ -n "$(diff -u <(cd ${fabric_dir} && ${gendoc_command}) ${metrics_doc})" ]; then
17+
if [ -n "$(diff -u <(cd "${fabric_dir}" && ${gendoc_command}) "${metrics_doc}")" ]; then
1818
echo "The Fabric metrics reference documentation is out of date."
1919
echo "Please run '$0 generate' to update the documentation."
2020
exit 1
@@ -23,7 +23,7 @@ case "$1" in
2323

2424
# generate the metrics documentation
2525
"generate")
26-
(cd "${fabric_dir}" && ${gendoc_command} > ${metrics_doc})
26+
(cd "${fabric_dir}" && ${gendoc_command} > "${metrics_doc}")
2727
;;
2828

2929
*)

0 commit comments

Comments
 (0)