[rtems commit] Fix bashism in vc-key.sh

Chris Johns chrisj at rtems.org
Sun Nov 12 21:15:27 UTC 2017


Module:    rtems
Branch:    master
Commit:    f5b3c0244c26e291473ca72c09cec0490f7bb462
Changeset: http://git.rtems.org/rtems/commit/?id=f5b3c0244c26e291473ca72c09cec0490f7bb462

Author:    Martin Erik Werner <martinerikwerner at gmail.com>
Date:      Sun Nov 12 15:39:53 2017 +0100

Fix bashism in vc-key.sh

Change "==" to "=", since "==" for comparison is not available in POSIX
sh.

Signed-off-by: Martin Erik Werner <martinerikwerner at gmail.com>

---

 cpukit/sapi/vc-key.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/cpukit/sapi/vc-key.sh b/cpukit/sapi/vc-key.sh
index c628a1e..3c8f446 100755
--- a/cpukit/sapi/vc-key.sh
+++ b/cpukit/sapi/vc-key.sh
@@ -15,7 +15,7 @@ if test $# -ge 1; then
   cd $repo
   if test -n ${git}; then
    git rev-parse --git-dir > /dev/null 2>&1
-   if test $? == 0; then
+   if test $? = 0; then
     git status > /dev/null 2>&1
     if git diff-index --quiet HEAD --; then
      modified=""
@@ -24,7 +24,7 @@ if test $# -ge 1; then
     fi
     vc_ident="$(git rev-parse --verify HEAD)${modified}"
     if test $# -ge 1; then
-     if test "${vc_ident}" == "$1"; then
+     if test "${vc_ident}" = "$1"; then
       vc_ident="matches"
      fi
     fi




More information about the vc mailing list