version 1.5, 2005/07/25 19:04:18 |
version 1.9, 2015/02/21 06:20:36 |
|
|
#!/bin/sh |
#!/bin/sh |
# $OpenXM: OpenXM/src/util/oxfetch.sh,v 1.4 2004/06/30 10:14:10 ohara Exp $ |
# $OpenXM: OpenXM/src/util/oxfetch.sh,v 1.8 2007/12/10 16:02:37 iwane 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" |
url=$1 |
url=$1 |
distdir=${2:-.} |
distdir=${2:-.} |
|
|
} |
} |
|
|
_fetch () { |
_fetch () { |
if [ "distfile" != "" -a ! -f "$distdir/$distfile" ]; then |
if [ "$distfile" != "" -a ! -f "$distdir/$distfile" ]; then |
(cd $distdir; $fetch $url) |
(cd $distdir; $fetch $url) |
fi |
fi |
} |
} |
|
|
} |
} |
|
|
_md5sum () { |
_md5sum () { |
if [ "`which md5`" ]; then |
md5.sh "$1" | awk '{print $NF}' |
md5 "$1" | awk '{print $NF}' |
|
elif [ "`which md5sum`" ]; then |
|
md5sum "$1" | awk '{print $1}' |
|
fi |
|
} |
} |
|
|
_check () { |
_check() { |
if [ ! -f "$distdir/$distfile" ]; then |
if [ ! -f "$distdir/$distfile" ]; then |
echo "Error: ${distfile} not found." |
echo "Error: ${distfile} not found." |
exit 1 |
exit 1 |