[ofbiz-framework] branch release17.12 updated: Fixed: Discouraged use of variable to store command with paramaters because of wordsplitting issue and instead used complete command for wget .(OFBIZ-12066)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[ofbiz-framework] branch release17.12 updated: Fixed: Discouraged use of variable to store command with paramaters because of wordsplitting issue and instead used complete command for wget .(OFBIZ-12066)

grv-2
This is an automated email from the ASF dual-hosted git repository.

grv pushed a commit to branch release17.12
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git


The following commit(s) were added to refs/heads/release17.12 by this push:
     new 2a30d57  Fixed: Discouraged use of variable to store command with paramaters because of wordsplitting issue and instead used complete command for wget .(OFBIZ-12066)
2a30d57 is described below

commit 2a30d5711809e9bbc06d6c84c2f421476405b8a8
Author: Girish Vasmatkar <[hidden email]>
AuthorDate: Mon Nov 30 16:26:41 2020 +0530

    Fixed: Discouraged use of variable to store command with paramaters because of wordsplitting issue
    and instead used complete command for wget .(OFBIZ-12066)
---
 gradle/init-gradle-wrapper.sh | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/gradle/init-gradle-wrapper.sh b/gradle/init-gradle-wrapper.sh
index 18602b5..82e3b44 100755
--- a/gradle/init-gradle-wrapper.sh
+++ b/gradle/init-gradle-wrapper.sh
@@ -48,11 +48,9 @@ downloadFile() {
            return 0;
        fi
    elif [ -n "$(whereIsBinary wget)" ]; then
-       GET_CMD="wget -q -O $GRADLE_WRAPPER_OFBIZ_PATH/$1 --server-response $2/$1";
-       GET_CMD="$GET_CMD 2>&1 > /dev/null | grep 'HTTP/.* 200'";
-       if [ -n "$($GET_CMD)" ]; then
+      if [[ `wget -q -S -O $GRADLE_WRAPPER_OFBIZ_PATH/$1 $2/$1 2>&1 > /dev/null | grep 'HTTP/1.1 200 OK'` ]]; then
            return 0;
-       fi
+      fi
    fi
    return 1
 }