Date:2013-09-10 16:55:49 (7 months 13 days ago)
Author:Werner Almesberger
Commit:3256b0329486f34aa143d13482384aee8182eb76
Message:dsv/dsv: sent User-Agent to "dsv/1.0" (instead of Wget/...)

Digi-Key now blocks wget from accessing their document cache.
Seems to be a rather silly move ...
Files: dsv/dsv (3 diffs)

Change Details

dsv/dsv
22#
33# dsv - Improved data sheet viewer
44#
5# Written 2010-2012 by Werner Almesberger
6# Copyright 2010-2012 Werner Almesberger
5# Written 2010-2013 by Werner Almesberger
6# Copyright 2010-2013 Werner Almesberger
77#
88# This program is free software; you can redistribute it and/or modify
99# it under the terms of the GNU General Public License as published by
...... 
4141}
4242
4343
44do_wget()
45{
46    wget -nv -U "dsv/1.0" "$@"
47}
48
49
4450up()
4551{
4652    old=`pwd`
...... 
6470    if [ ! -r "$DSV_DIR/$ds" ]; then
6571    inside=${url#*.[Zz][Ii][Pp] }
6672    if [ "$inside" = "$url" ]; then
67        wget -nv -O "$DSV_DIR/$ds" "$url"
73        do_wget -O "$DSV_DIR/$ds" "$url"
6874        # @@@ should handle error
6975    else
7076        url=${url%`echo x"$inside" | sed 's/./?/g'`}
7177        zip=$nm-`basename "$url"`
7278        if [ ! -r "$DSV_DIR/$zip" ]; then
73            wget -nv -O "$DSV_DIR/$zip" "$url"
79            do_wget -O "$DSV_DIR/$zip" "$url"
7480            # @@@ should handle error
7581        fi
7682        unzip -p "$DSV_DIR/$zip" "$inside" >"$DSV_DIR/$ds" ||

Archive Download the corresponding diff file

Branches:
master



interactive