summaryrefslogtreecommitdiff
path: root/xii
blob: fd88276aa760d41fa75674c3bae6ef65aecd66b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh

# Download and display images referenced in Image headers

: ${VIEWER:=fbi}

# Create temporary directory for images
dir=/tmp/$RANDOM
mkdir $dir

sed -n 's/^Image: //p' |
while read url
do
	curl "$url" > $dir/$RANDOM
done

# Display images and delete them afterwards
eval $VIEWER $dir/* < /dev/tty
rm -r $dir