|
|
|
@ -3,7 +3,7 @@ |
|
|
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch. |
|
|
|
# |
|
|
|
# Filename: bin/sde-download2 |
|
|
|
# Copyright (C) 2007 The OpenSDE Project |
|
|
|
# Copyright (C) 2007 - 2008 The OpenSDE Project |
|
|
|
# |
|
|
|
# More information can be found in the files COPYING and README. |
|
|
|
# |
|
|
|
@ -120,7 +120,7 @@ while [ $# -gt 0 ]; do |
|
|
|
esac ;; |
|
|
|
--alt-dir) |
|
|
|
shift |
|
|
|
if [ "$1" == "none" -o -z "$1" ]; then |
|
|
|
if [ "$1" = "none" -o -z "$1" ]; then |
|
|
|
altdir= |
|
|
|
$SDEROOT/bin/sde-config-ini --file=$SDESETTINGS --delete "download.altdir" |
|
|
|
elif [ -d "$1/" ]; then |
|
|
|
@ -200,7 +200,7 @@ esac | while read pkg cksum file location; do |
|
|
|
# a file was found, what should I do with it? |
|
|
|
[ $verbose -le 0 ] || echo_info "$pkg:${file##*/} found in $altfile ($mode)." |
|
|
|
|
|
|
|
[ "$check" == "always" ] || check_this=no |
|
|
|
[ "$check" = "always" ] || check_this=no |
|
|
|
|
|
|
|
case "$mode" in |
|
|
|
hardlink) cp -lf "$altfile" "$tmpfile" ;; |
|
|
|
@ -234,9 +234,9 @@ esac | while read pkg cksum file location; do |
|
|
|
|
|
|
|
# validate the file against the known checksum |
|
|
|
# |
|
|
|
if [ -s "$tmpfile" -a "$check_this" == "yes" -a "$cksum" != "X" ]; then |
|
|
|
if [ -s "$tmpfile" -a "$check_this" = "yes" -a "$cksum" != "X" ]; then |
|
|
|
cksum_real=$( sh $SDEROOT/lib/sde-download/cksum.sh $tmpfile | cut -d' ' -f2 ) |
|
|
|
if [ "$cksum" == "0" ]; then |
|
|
|
if [ "$cksum" = "0" ]; then |
|
|
|
echo_warning "$pkg:${file##*/} is missing a checksum value, ignoring. ($cksum_real)" |
|
|
|
elif [ "$cksum" != "$cksum_real" ]; then |
|
|
|
echo_error "$pkg:${file##*/} has a wrong checksum, failing. ($cksum != $cksum_real)" |
|
|
|
|