diff options
author | Nick White <git@njw.name> | 2015-05-21 13:18:55 +0100 |
---|---|---|
committer | Nick White <git@njw.name> | 2015-05-21 13:18:55 +0100 |
commit | cdffd29c9105740fdf1604b9c36062e26c544619 (patch) | |
tree | cb34570f137bf72f935eb7065b1d12cc909ecbea /pull-images | |
parent | 643a2dc66034baf2402149a4cdf98a6f15d7806b (diff) | |
download | tkread-cdffd29c9105740fdf1604b9c36062e26c544619.tar.bz2 tkread-cdffd29c9105740fdf1604b9c36062e26c544619.zip |
Add support for urls starting // in pull-images
Diffstat (limited to 'pull-images')
-rwxr-xr-x | pull-images | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/pull-images b/pull-images index fd864bc..944228a 100755 --- a/pull-images +++ b/pull-images @@ -5,10 +5,13 @@ usage="Usage: $0 filename [urlroot]" test $# -eq 0 && echo "$usage" && exit 1 test $# -gt 2 && echo "$usage" && exit 1 +proto=`echo "$2" | awk -F : '{print $1}'` + imgurls=`cat "$1" \ | awk -F \( '/!\[[^\]]*\]\([^\)]*\)/ {print $2}' \ | sed 's/).*//' \ | awk '{print $1}' \ +| sed "s/^\/\//${proto}:\/\//g" \ | sort | uniq` for i in $imgurls; do |