diff options
author | eik <eik@FreeBSD.org> | 2004-07-09 07:30:04 +0800 |
---|---|---|
committer | eik <eik@FreeBSD.org> | 2004-07-09 07:30:04 +0800 |
commit | b24c0d6b30f6f07c5dab97233d9ba200f490ba76 (patch) | |
tree | ec938130364f703e0831e7a5cdb2555d183abe88 | |
parent | 5eacbc4da7fabdee548b8c794e4e302e512fb401 (diff) | |
download | freebsd-ports-gnome-b24c0d6b30f6f07c5dab97233d9ba200f490ba76.tar.gz freebsd-ports-gnome-b24c0d6b30f6f07c5dab97233d9ba200f490ba76.tar.zst freebsd-ports-gnome-b24c0d6b30f6f07c5dab97233d9ba200f490ba76.zip |
FWIIW, enable the use of
make DISABLE_SIZE=yes checkdistsites
to check for corrupted files on sites that don't support SIZE
(the files are unfetchable from these sites anyway)
-rw-r--r-- | devel/portmk/scripts/distfiles.sh | 15 | ||||
-rw-r--r-- | ports-mgmt/portmk/scripts/distfiles.sh | 15 |
2 files changed, 18 insertions, 12 deletions
diff --git a/devel/portmk/scripts/distfiles.sh b/devel/portmk/scripts/distfiles.sh index 18916518d922..0c914d8b89f9 100644 --- a/devel/portmk/scripts/distfiles.sh +++ b/devel/portmk/scripts/distfiles.sh @@ -263,7 +263,7 @@ fetch_curl() fi $SETENV $FETCH_ENV $FETCH_CMD $FETCH_BEFORE_ARGS$cksize \ - $4 -o "$2" "$1" $FETCH_AFTER_ARGS + -o "$2" "$1" $FETCH_AFTER_ARGS } fetch_fetch() @@ -286,12 +286,12 @@ fetch_fetch() fi $SETENV $FETCH_ENV $FETCH_CMD $FETCH_BEFORE_ARGS$symlink$cksize \ - $4 -o "$2" "$1" $FETCH_AFTER_ARGS + -o "$2" "$1" $FETCH_AFTER_ARGS } fetch_wget() { - case "$4" in + case "$1" in file:*) fetch_fetch "$@" || return 1 return 0;; @@ -303,7 +303,7 @@ fetch_wget() esac $SETENV $FETCH_ENV $FETCH_CMD $FETCH_BEFORE_ARGS \ - $4 -O "$2" "$1" $FETCH_AFTER_ARGS + -O "$2" "$1" $FETCH_AFTER_ARGS } ### @@ -682,7 +682,10 @@ do_fetch_all() $ECHO_MSG ">> No checksum recorded for $DIR$file." return 1 fi - CKSIZE=`extract_sum 'SIZE' "$DIR" "$file"` + CKSIZE= + if [ -z "$DISABLE_SIZE" ]; then + CKSIZE=`extract_sum 'SIZE' "$DIR" "$file"` + fi $ECHO_MSG ">> Verifying availability of file $file." MASTER_SITES_TMP=`get_master_sites "$fileset" "$select"` @@ -718,7 +721,7 @@ do_fetch_all() done else if _FETCH_RESULT=`$SETENV $FETCH_ENV $FETCH -s "$url"`; then - if [ -z "$DISABLE_SIZE" -a -n "${CKSIZE#*=}" ]; then + if [ -n "${CKSIZE}" ]; then if [ "${CKSIZE#*=}" = "$_FETCH_RESULT" ]; then $ECHO_MSG ">> Size OK (${CKSIZE#*=}) for $file." else diff --git a/ports-mgmt/portmk/scripts/distfiles.sh b/ports-mgmt/portmk/scripts/distfiles.sh index 18916518d922..0c914d8b89f9 100644 --- a/ports-mgmt/portmk/scripts/distfiles.sh +++ b/ports-mgmt/portmk/scripts/distfiles.sh @@ -263,7 +263,7 @@ fetch_curl() fi $SETENV $FETCH_ENV $FETCH_CMD $FETCH_BEFORE_ARGS$cksize \ - $4 -o "$2" "$1" $FETCH_AFTER_ARGS + -o "$2" "$1" $FETCH_AFTER_ARGS } fetch_fetch() @@ -286,12 +286,12 @@ fetch_fetch() fi $SETENV $FETCH_ENV $FETCH_CMD $FETCH_BEFORE_ARGS$symlink$cksize \ - $4 -o "$2" "$1" $FETCH_AFTER_ARGS + -o "$2" "$1" $FETCH_AFTER_ARGS } fetch_wget() { - case "$4" in + case "$1" in file:*) fetch_fetch "$@" || return 1 return 0;; @@ -303,7 +303,7 @@ fetch_wget() esac $SETENV $FETCH_ENV $FETCH_CMD $FETCH_BEFORE_ARGS \ - $4 -O "$2" "$1" $FETCH_AFTER_ARGS + -O "$2" "$1" $FETCH_AFTER_ARGS } ### @@ -682,7 +682,10 @@ do_fetch_all() $ECHO_MSG ">> No checksum recorded for $DIR$file." return 1 fi - CKSIZE=`extract_sum 'SIZE' "$DIR" "$file"` + CKSIZE= + if [ -z "$DISABLE_SIZE" ]; then + CKSIZE=`extract_sum 'SIZE' "$DIR" "$file"` + fi $ECHO_MSG ">> Verifying availability of file $file." MASTER_SITES_TMP=`get_master_sites "$fileset" "$select"` @@ -718,7 +721,7 @@ do_fetch_all() done else if _FETCH_RESULT=`$SETENV $FETCH_ENV $FETCH -s "$url"`; then - if [ -z "$DISABLE_SIZE" -a -n "${CKSIZE#*=}" ]; then + if [ -n "${CKSIZE}" ]; then if [ "${CKSIZE#*=}" = "$_FETCH_RESULT" ]; then $ECHO_MSG ">> Size OK (${CKSIZE#*=}) for $file." else |