release.sh changes & fixes
[minix3.git] / external / lgpl3 / mpc / fetch.sh
blob08ad4527fa00ff0f5e1e613ed08d06d09e688f98
1 #!/bin/sh
3 # Make sure we're in our directory (i.e., where this shell script is)
4 echo $0
5 cd `dirname $0`
7 # Configure fetch method
8 URL="http://www.minix3.org/pkgsrc/distfiles/minix/3.3.0/mpc-1.0.1.tar.gz"
9 BACKUP_URL="http://www.multiprecision.org/mpc/download/mpc-1.0.1.tar.gz"
10 FETCH=ftp
11 which curl >/dev/null
12 if [ $? -eq 0 ]; then
13 FETCH="curl -O -f"
16 # Fetch sources if not available
17 if [ ! -d dist ];
18 then
19 if [ ! -f mpc-1.0.1.tar.gz ]; then
20 $FETCH $URL
21 if [ $? -ne 0 ]; then
22 $FETCH $BACKUP_URL
26 tar -oxzf mpc-1.0.1.tar.gz
27 mv mpc-1.0.1 dist