Skip to content

Commit

Permalink
Allow specifying which directory to put the downloaded files.
Browse files Browse the repository at this point in the history
  • Loading branch information
mzhaom committed Sep 25, 2015
1 parent 42a5ee9 commit ad22129
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions grte/download.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,25 @@
#!/bin/bash
#!/bin/bash -e

absname=`readlink -f "$0"`
absroot="${absname%/*}"
absroot="$(dirname $absname)"
cfg="${absroot}/grte.cfg"

[ -f "${absroot}/../grte.cfg" ] || {
error "could not find ${absroot}/../grte.cfg"
[ -f $cfg ] || {
echo "could not find $cfg"
exit 1
}

. "${absroot}/../grte.cfg"
. "$cfg"

if [[ -n $TAR_DIR ]]; then
echo "changing to $TAR_DIR"
test -d $TAR_DIR || mkdir -p $TAR_DIR
cd $TAR_DIR
else
echo "no sources"
fi

alias wget='wget -c'
wget https://ftp.gnu.org/gnu/glibc/glibc-${glibc_version}.tar.bz2
wget http://ftp.gnu.org/gnu/binutils/binutils-${binutils_version}.tar.bz2
wget https://ftp.gnu.org/gnu/gcc/gcc-${gcc_version}/gcc-${gcc_version}.tar.bz2
Expand All @@ -17,4 +28,3 @@ wget https://ftp.gnu.org/gnu/mpfr/mpfr-${mpfr_version}.tar.bz2
wget https://ftp.gnu.org/gnu/mpc/mpc-${mpc_version}.tar.gz
wget http://zlib.net/zlib-${zlib_version}.tar.gz
wget https://www.kernel.org/pub/linux/kernel/v3.x/linux-${headers26}.tar.xz

0 comments on commit ad22129

Please sign in to comment.