Skip to content

Commit

Permalink
FAB-15675 Fix issues flagged by shellcheck
Browse files Browse the repository at this point in the history
For check_license.sh & metrics_doc.sh
Need to check with shellcheck 0.6.0

Change-Id: I39c60cf4a9326e9fa5f74159a9f9a199bb77d1fe
Signed-off-by: Atsushi Neki <[email protected]>
  • Loading branch information
nekia committed Jun 14, 2019
1 parent f2cc88c commit 368ec56
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion scripts/check_license.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
# SPDX-License-Identifier: Apache-2.0
#

source "$(cd $(dirname "$0") && pwd)/functions.sh"
# shellcheck source=/dev/null
source "$(cd "$(dirname "$0")" && pwd)/functions.sh"

CHECK=$(git diff --name-only --diff-filter=ACMRTUXB HEAD | tr '\n' ' ')
if [[ -z "$CHECK" ]]; then
Expand Down
4 changes: 2 additions & 2 deletions scripts/metrics_doc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ case "$1" in
# check if the metrics documentation is up to date with the metrics
# options in the tree
"check")
if [ -n "$(diff -u <(cd ${fabric_dir} && ${gendoc_command}) ${metrics_doc})" ]; then
if [ -n "$(diff -u <(cd "${fabric_dir}" && ${gendoc_command}) "${metrics_doc}")" ]; then
echo "The Fabric metrics reference documentation is out of date."
echo "Please run '$0 generate' to update the documentation."
exit 1
Expand All @@ -23,7 +23,7 @@ case "$1" in

# generate the metrics documentation
"generate")
(cd "${fabric_dir}" && ${gendoc_command} > ${metrics_doc})
(cd "${fabric_dir}" && ${gendoc_command} > "${metrics_doc}")
;;

*)
Expand Down

0 comments on commit 368ec56

Please sign in to comment.