lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master 2c95b12 08/12: Resolve all shellcheck "SC2046


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 2c95b12 08/12: Resolve all shellcheck "SC2046" warnings
Date: Sun, 12 May 2019 22:25:17 -0400 (EDT)

branch: master
commit 2c95b12de200dcc679cc404fb6edd16a02025d60
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Resolve all shellcheck "SC2046" warnings
---
 check_git_setup.sh | 2 +-
 install_msw.sh     | 2 +-
 test_schemata.sh   | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/check_git_setup.sh b/check_git_setup.sh
index 08117fd..a61e949 100755
--- a/check_git_setup.sh
+++ b/check_git_setup.sh
@@ -24,7 +24,7 @@
 # Navigate to the directory where this script resides, and make sure
 # it's a git "toplevel" directory.
 
-cd $(dirname $(readlink -f "$0")) || printf 'Cannot cd\n'
+cd "$(dirname "$(readlink -f "$0")")" || printf 'Cannot cd\n'
 toplevel=$(git rev-parse --show-toplevel)
 printf '"%s" is current directory\n' "$PWD"
 printf '"%s" is git toplevel directory\n' "$toplevel"
diff --git a/install_msw.sh b/install_msw.sh
index 99b27d3..02d9cd5 100755
--- a/install_msw.sh
+++ b/install_msw.sh
@@ -310,7 +310,7 @@ fi
 stamp1=$(date -u +'%Y-%m-%dT%H:%M:%SZ')
 echo "Finished: $stamp1"
 
-seconds=$(expr $(date '+%s' -d "$stamp1") - $(date '+%s' -d "$stamp0"))
+seconds=$(expr "$(date '+%s' -d "$stamp1")" - "$(date '+%s' -d "$stamp0")")
 elapsed=$(date -u -d @"$seconds" +'%H:%M:%S')
 echo "Elapsed: $elapsed"
 
diff --git a/test_schemata.sh b/test_schemata.sh
index bf71e7d..e9bf8bb 100755
--- a/test_schemata.sh
+++ b/test_schemata.sh
@@ -25,7 +25,7 @@ echo "  Test schemata..."
 
 # Directory where this script resides.
 
-srcdir=$(dirname $(readlink --canonicalize "$0"))
+srcdir=$(dirname "$(readlink --canonicalize "$0")")
 
 # Directory where 'jing.jar' and 'trang.jar' reside, along with their
 # support files--extracted from:



reply via email to

[Prev in Thread] Current Thread [Next in Thread]