diff options
Diffstat (limited to 'sfeed_update')
-rwxr-xr-x | sfeed_update | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sfeed_update b/sfeed_update index d975518..96f1111 100755 --- a/sfeed_update +++ b/sfeed_update @@ -94,12 +94,6 @@ feed() { basesiteurl="$3" encoding="$4" - # if baseurl is empty then use the path from the feed by default. - if [ "${basesiteurl}" = "" ]; then - host="${feedurl##*://}" - basesiteurl="${feedurl%%://*}://${host%/*}/" - fi - filename="$(printf '%s' "${name}" | tr '/' '_')" sfeedfile="${sfeedpath}/${filename}" tmpfeedfile="${sfeedtmpdir}/${filename}" @@ -121,6 +115,12 @@ feed() { fi rm -f "${tmpfeedfile}.fetch" + # if baseurl is empty then use the path from the feed by default. + if [ "${basesiteurl}" = "" ]; then + host="${feedurl##*://}" + basesiteurl="${feedurl%%://*}://${host%/*}/" + fi + if ! parse "${name}" "${feedurl}" "${basesiteurl}" < "${tmpfeedfile}.utf8" > "${tmpfeedfile}.tsv"; then log "${name}" "FAIL (PARSE)" return |