summaryrefslogtreecommitdiff
path: root/xii
blob: c79e967317e8011cca18e7b132b52df0f5fba8ba (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 X-Image images

: ${VIEWER:=fbi}

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

sed -n 's/^X-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