#!/bin/bash

grep ^Image: names.txt | sort | uniq | while read i; do 
    url="$(lynx -dump "http://wiki.openmoko.org/wiki/$i"|grep images/[0-9a-f]/ | sed -n 1p | awk '{print $2}')"
    wget -cx "$url"
done
