Mercurial > ec-dotfiles
comparison bin/moefetch @ 324:391f2b64900e
Fixed sed test to be compatible with POSIX regex.
author | Edho Arief <edho@myconan.net> |
---|---|
date | Sun, 18 Mar 2012 13:23:06 +0700 |
parents | 3bb8d53b61dc |
children | fc644e52df7c |
comparison
equal
deleted
inserted
replaced
323:3bb8d53b61dc | 324:391f2b64900e |
---|---|
125 url="${SITE}/post/index.xml?tags=$(get_cleantags "${TAGS}")&offset=0&limit=1000&page=${iternum}" | 125 url="${SITE}/post/index.xml?tags=$(get_cleantags "${TAGS}")&offset=0&limit=1000&page=${iternum}" |
126 [ ${_use_login} -eq 1 ] && url="${url}&login=${LOGIN_USER}&password_hash=${LOGIN_PASS}" | 126 [ ${_use_login} -eq 1 ] && url="${url}&login=${LOGIN_USER}&password_hash=${LOGIN_PASS}" |
127 wget --no-check-certificate --quiet "${url}" -O "${TEMP_PREFIX}-xml" --referer="${SITE}/post" --user-agent="${useragent}" -e continue=off || Err_Fatal "Failed download catalog file" | 127 wget --no-check-certificate --quiet "${url}" -O "${TEMP_PREFIX}-xml" --referer="${SITE}/post" --user-agent="${useragent}" -e continue=off || Err_Fatal "Failed download catalog file" |
128 printf "Processing XML file... " | 128 printf "Processing XML file... " |
129 # xslt evilry | 129 # xslt evilry |
130 xsltproc - "${TEMP_PREFIX}-xml" <<EOF | sed 's/.*\(https?.*\)\(\/[a-f0-9]\{32\}\).*\.\([^\.]*\)/\1\2.\3/g' | grep ^http > "${TEMP_PREFIX}-templist" | 130 xsltproc - "${TEMP_PREFIX}-xml" <<EOF | sed 's/.*\(https*.*\)\(\/[a-f0-9]\{32\}\).*\.\([^\.]*\)/\1\2.\3/g' | grep ^http > "${TEMP_PREFIX}-templist" |
131 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> | 131 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> |
132 <xsl:output method="xml" indent="yes"/> | 132 <xsl:output method="xml" indent="yes"/> |
133 <xsl:template match="post"> | 133 <xsl:template match="post"> |
134 <xsl:value-of select="@file_url" /> | 134 <xsl:value-of select="@file_url" /> |
135 </xsl:template> | 135 </xsl:template> |