contrib: Don't pass wget options to curl

Message ID 20200707224436.87198-1-mike@nolta.net
State New
Headers show
Series
  • contrib: Don't pass wget options to curl
Related show

Commit Message

Richard Biener via Gcc-patches July 7, 2020, 10:44 p.m.
This is a harmless bug, as the script still works, but curl's '-O'
option isn't the same as wget's.

contrib/ChangeLog:

	* download_prerequisites: Don't pass wget options to curl.
---
 contrib/download_prerequisites | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.21.0

Comments

Richard Biener via Gcc-patches July 10, 2020, 8:06 p.m. | #1
On Tue, 2020-07-07 at 18:44 -0400, Mike Nolta via Gcc-patches wrote:
> This is a harmless bug, as the script still works, but curl's '-O'

> option isn't the same as wget's.

> 

> contrib/ChangeLog:

> 

> 	* download_prerequisites: Don't pass wget options to curl.

THanks.  I've pushed this to the trunk.

jeff
>

Patch

diff --git a/contrib/download_prerequisites b/contrib/download_prerequisites
index da19913f9..7d0c4b5ea 100755
--- a/contrib/download_prerequisites
+++ b/contrib/download_prerequisites
@@ -222,7 +222,7 @@  for ar in $(echo_archives)
 do
     if [ ${force} -gt 0 ]; then rm -f "${directory}/${ar}"; fi
     [ -e "${directory}/${ar}" ]                                               \
-        || ${fetch} --no-verbose -O "${directory}/${ar}" "${base_url}${ar}"       \
+        || ( cd "${directory}" && ${fetch} --no-verbose "${base_url}${ar}" )  \
         || die "Cannot download ${ar} from ${base_url}"
 done
 unset ar