summaryrefslogtreecommitdiff
path: root/pull-images
diff options
context:
space:
mode:
Diffstat (limited to 'pull-images')
-rwxr-xr-xpull-images8
1 files changed, 5 insertions, 3 deletions
diff --git a/pull-images b/pull-images
index 57ed567..fd864bc 100755
--- a/pull-images
+++ b/pull-images
@@ -7,11 +7,13 @@ test $# -gt 2 && echo "$usage" && exit 1
imgurls=`cat "$1" \
| awk -F \( '/!\[[^\]]*\]\([^\)]*\)/ {print $2}' \
-| sed 's/)\]$//' \
-| awk '{print $1}'`
+| sed 's/).*//' \
+| awk '{print $1}' \
+| sort | uniq`
for i in $imgurls; do
echo "$i" | grep -q '//'
test $? -ne 0 && i="${2}${i}"
- wget "$i"
+ echo "Downloading $i"
+ wget -q "$i"
done