mirror of
git://projects.qi-hardware.com/eda-tools.git
synced 2024-12-22 23:26:47 +02:00
dsv/dsv: add support for PDF embedded in ZIP
Syntax: D: url-to-zip-file path-of-pdf-in-zip Example: D: http://www.usb.org/developers/docs/usb_20_071012.zip usb_20_071012/usb_20.pdf
This commit is contained in:
parent
d67e8ec823
commit
e5e67dd597
12
dsv/dsv
12
dsv/dsv
@ -61,8 +61,16 @@ flush()
|
||||
ds=$nm-`basename "$url"`
|
||||
mkdir -p $DSV_DIR
|
||||
if [ ! -r "$DSV_DIR/$ds" ]; then
|
||||
wget -nv -O "$DSV_DIR/$ds" "$url"
|
||||
# @@@ should handle error
|
||||
inside=${url#*.[Zz][Ii][Pp] }
|
||||
if [ "$inside" = "$url" ]; then
|
||||
wget -nv -O "$DSV_DIR/$ds" "$url"
|
||||
# @@@ should handle error
|
||||
else
|
||||
url=${url%`echo x"$inside" | sed 's/./?/g'`}
|
||||
wget -nv -O "$DSV_DIR/_tmp" "$url"
|
||||
unzip -p "$DSV_DIR/_tmp" "$inside" >"$DSV_DIR/$ds" ||
|
||||
{ rm -f "$DSV_DIR/$ds"; exit 1; }
|
||||
fi
|
||||
fi
|
||||
eval for n in $name $alias\; do \
|
||||
'nm=`echo "$n" | sed "s/%/%25/g;s|/|%2F|g"`;' \
|
||||
|
Loading…
Reference in New Issue
Block a user