diff options
Diffstat (limited to 'fetch-images.sh')
-rwxr-xr-x | fetch-images.sh | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fetch-images.sh b/fetch-images.sh index bec3a6f..604b8ef 100755 --- a/fetch-images.sh +++ b/fetch-images.sh @@ -26,6 +26,8 @@ echo "${orig_src}" | while read line ; do getpath="${line}" echo "${getpath}" | grep -q -E "https?:\/\/" || getpath="${INSERVER}${getpath}" temp="$( echo "${line}" | sed -r -e "s@${INSERVERREGEX}@@g" -e 's@/-/@/@g' )" + temp="${temp##/}" + temp=".$( echo "${temp}" | sed -r -e 's/^\.+//g;' )" outdir="$( dirname "${temp}" | sed -r -e 's@^/@@' )" test ! -d "${outdir}" && mkdir -p "${outdir}" targetfile="${temp%%\?*}" # for output file itself remove the question mark which is normally width attribute |