This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Script to download gcc prerequisites
On Thu, May 27, 2010 at 7:28 PM, Pedro Alves <pedro@codesourcery.com> wrote:
>> +wget http://www.mpfr.org/$MPFR/$MPFR.tar.gz || exit 1
>> +tar xzf $MPFR.tar.gz || exit 1
>> +ln -sf $MPFR mpfr || exit 1
>> +
>> +wget ftp://ftp.gmplib.org/pub/$GMP/$GMP.tar.bz2 || exit 1
>> +tar xjf $GMP.tar.bz2 ?|| exit 1
>> +ln -sf $GMP gmp || exit 1
>> +
>> +wget http://www.multiprecision.org/mpc/download/$MPC.tar.gz || exit 1
>> +tar xzf $MPC.tar.gz || exit 1
>> +ln -sf $MPC mpc || exit 1
>> +
>> +rm $MPFR.tar.gz $GMP.tar.bz2 $MPC.tar.gz || exit 1
>
> I guess a "set -e" instead of all those "|| exit 1" would work too.
>
> --
> Pedro Alves
>
You can also pipe the output through tar from wget like in the make
file I referenced. That way you don't need temp files.