Codebase list debian-goodies / 19924c9
Add error message on download errors Axel Beckert 7 years ago
1 changed file(s) with 9 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
6565 mandir=`mktemp -d dman.XXXXXX`
6666 trap "rm -rf $mandir" EXIT HUP INT QUIT TERM
6767 man="$mandir/$PAGE"
68 if wget -O "$man" "$URL/$DISTRIB_CODENAME/$PAGE$LOCDOT.gz" 2>/dev/null; then
68 URLLOC="$URL/$DISTRIB_CODENAME/$PAGE$LOCDOT.gz"
69 if wget -O "$man" "$URLLOC" 2>/dev/null; then
6970 man $MAN_ARGS -l "$man" || true
7071 exit 0
7172 fi
7273 # try again without locale
73 if [ "$LOCALE" != "" ] && wget -O "$man" "$URL/$DISTRIB_CODENAME/$PAGE.gz" 2>/dev/null; then
74 URLNLC="$URL/$DISTRIB_CODENAME/$PAGE.gz"
75 if [ "$LOCALE" != "" ] && wget -O "$man" "$URLNLC" 2>/dev/null; then
7476 man $MAN_ARGS -l "$man" || true
7577 exit 0
7678 fi
79
80 echo "$0: A download error occurred. Neither" 1>&2
81 echo "$0: $URLLOC nor" 1>&2
82 echo "$0: $URLNLC could be fetched." 1>&2
83 exit 1