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

# Download and display X-Image images

: ${VIEWER:=fbi}

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

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

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