wget or curl is selected according to system configuration

Thanks to pacman from the ST community for the tip
This commit is contained in:
Xavier ASUS 2019-10-29 23:34:42 +01:00
parent 7c2ecfe5d0
commit 7073032fcc
1 changed files with 3 additions and 2 deletions

View File

@ -1,6 +1,7 @@
#!/bin/sh
wget -nc https://ftp.gnu.org/gnu/binutils/binutils-2.30.tar.xz
wget -nc https://ftp.gnu.org/gnu/gdb/gdb-8.1.tar.xz
which wget 2>/dev/null 1&>&2 && dl="wget -nc" || dl="curl -OLk --retry 5"
$dl ftp.gnu.org/gnu/binutils/binutils-2.30.tar.xz
$dl ftp.gnu.org/gnu/gdb/gdb-8.1.tar.xz
mkdir -p binutils-2.30
tar -xvf gdb-8.1.tar.xz --strip-components=1 --directory=binutils-2.30
tar -xvf binutils-2.30.tar.xz