lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master 50c620e 3/3: Improve portability of shell scr


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 50c620e 3/3: Improve portability of shell script
Date: Sat, 7 Apr 2018 03:46:58 -0400 (EDT)

branch: master
commit 50c620eb152247506efaf47c15939cf77175ee74
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Improve portability of shell script
    
    Made some changes suggested by 'shellcheck'.
---
 install_wx.sh | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/install_wx.sh b/install_wx.sh
index 9b9e38b..5e8def0 100755
--- a/install_wx.sh
+++ b/install_wx.sh
@@ -52,7 +52,7 @@ then
     cd $wx_dir
 else
     cd $wx_dir
-    if [ `git rev-parse HEAD` = $wx_commit_sha ]
+    if [ $(git rev-parse HEAD) = "$wx_commit_sha" ]
     then
         # Don't bother updating anything if we already had the correct version
         # of the tree.
@@ -62,11 +62,11 @@ else
         # it yet.
         if ! git rev-parse --quiet --verify "$wx_commit_sha^{commit}" 
>/dev/null
         then
-            git fetch $wx_git_url
+            git fetch "$wx_git_url"
         fi
     fi
 
-    [ -n "$skip_update" ] || git checkout $wx_commit_sha
+    [ -n "$skip_update" ] || git checkout "$wx_commit_sha"
 fi
 
 if [ "$skip_update" != 1 ]
@@ -83,7 +83,7 @@ then
                 ;;
         esac
 
-        suburl=`git config --file .gitmodules --get submodule.${subpath}.url`
+        suburl=$(git config --file .gitmodules --get submodule.${subpath}.url)
 
         # Configure the submodule to use URL relative to the one used for the
         # super-repository itself: this doesn't change anything when using the
@@ -92,7 +92,7 @@ then
         # a mirror, avoiding (slow and possibly unreliable) network access.
         git config submodule.${subpath}.url ${wx_git_url%/*}/${suburl##*/}
 
-        git submodule update --init $subpath
+        git submodule update --init "$subpath"
     done
 fi
 



reply via email to

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