version 1.7, 2006/10/13 11:51:25 |
version 1.10, 2016/06/05 13:53:34 |
|
|
#!/bin/sh |
#!/bin/sh |
# $OpenXM: OpenXM/src/util/oxfetch.sh,v 1.6 2006/10/12 10:45:37 takayama Exp $ |
# $OpenXM: OpenXM/src/util/oxfetch.sh,v 1.9 2015/02/21 06:20:36 ohara Exp $ |
|
|
MASTER_SITES="ftp://ftp.math.kobe-u.ac.jp/pub/OpenXM/misc/" |
MASTER_SITES="http://www.math.kobe-u.ac.jp/pub/OpenXM/misc/" |
fetch="wget --no-directories --passive-ftp --timestamping" |
fetch="wget --no-directories --passive-ftp --timestamping" |
|
curl="curl --remote-name --remote-time" |
url=$1 |
url=$1 |
distdir=${2:-.} |
distdir=${2:-.} |
distinfo=${3:-./distinfo} |
distinfo=${3:-./distinfo} |
|
|
} |
} |
|
|
_fetch () { |
_fetch () { |
if [ "distfile" != "" -a ! -f "$distdir/$distfile" ]; then |
if ! which wget > /dev/null 2>&1; then fetch="${curl}"; fi |
|
if [ "$distfile" != "" -a ! -f "$distdir/$distfile" ]; then |
(cd $distdir; $fetch $url) |
(cd $distdir; $fetch $url) |
fi |
fi |
} |
} |