=================================================================== RCS file: /home/cvs/OpenXM/src/util/oxfetch.sh,v retrieving revision 1.6 retrieving revision 1.10 diff -u -p -r1.6 -r1.10 --- OpenXM/src/util/oxfetch.sh 2006/10/12 10:45:37 1.6 +++ OpenXM/src/util/oxfetch.sh 2016/06/05 13:53:34 1.10 @@ -1,8 +1,9 @@ #!/bin/sh -# $OpenXM: OpenXM/src/util/oxfetch.sh,v 1.5 2005/07/25 19:04:18 ohara 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" +curl="curl --remote-name --remote-time" url=$1 distdir=${2:-.} distinfo=${3:-./distinfo} @@ -20,7 +21,8 @@ _mkdir () { } _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) fi } @@ -33,18 +35,10 @@ _md5grep () { } _md5sum () { - if [ "`which md5`" ]; then - md5 "$1" | awk '{print $NF}' - elif [ "`which md5sum`" ]; then - md5sum "$1" | awk '{print $1}' - fi + md5.sh "$1" | awk '{print $NF}' } _check() { - echo "Check is skipped." -} - -_check_orig () { if [ ! -f "$distdir/$distfile" ]; then echo "Error: ${distfile} not found." exit 1