|
37 | 37 | # This script complies with Semantic Versioning: http://semver.org/ |
38 | 38 | vMajor=0 |
39 | 39 | vMinor=4 |
40 | | -vPatch=13 |
| 40 | +vPatch=14 |
41 | 41 | vHash='$Hash$' |
42 | 42 |
|
43 | 43 | # Get zsh functions necessary for this script. |
@@ -363,8 +363,11 @@ function enableFeed() { |
363 | 363 | if [[ -z "${rssXML}" ]] ; then |
364 | 364 | warning "I could not retrieve this feed. Please make sure the URL, username (if needed) and password (if needed) are correct and try again." |
365 | 365 | else |
366 | | - typeset feedTitle=$(echo "${rssXML}" | ${XMLSTARLET} sel -t -m /rss/channel -v title --nl) |
367 | | - typeset -r feedEnclosureFileExt=${$(echo "${rssXML}" | ${XMLSTARLET} sel -t -m /rss/channel -v item/enclosure/@url --nl)##*.} |
| 366 | + typeset feedTitle=$(echo "${rssXML}" | ${XMLSTARLET} sel -t -m /rss/channel -v title) |
| 367 | + ## BUG ALERT: this "algorithm" for determining the download |
| 368 | + ## file extension is not foolproof. More work to be done. |
| 369 | + typeset -r firstFeedEnclosure=$(echo "${rssXML}" | ${XMLSTARLET} sel -t -m /rss/channel -v item/enclosure/@url --nl | ${HEAD} -n 1) |
| 370 | + typeset -r feedEnclosureFileExt=${${firstFeedEnclosure%%\?*}##*.} |
368 | 371 | fi |
369 | 372 |
|
370 | 373 | # Offer to create a Rivendell dropbox if we are making changes |
@@ -1325,10 +1328,10 @@ EOF |
1325 | 1328 | ########################################################################################## |
1326 | 1329 |
|
1327 | 1330 | ############# BEGIN external shell commands used in this script. ############# |
1328 | | -# This script uses these 24 external commands. |
| 1331 | +# This script uses these 25 external commands. |
1329 | 1332 | # Look for them in their upper case, parameter expanded form. |
1330 | 1333 | typeset -a our_commands |
1331 | | -our_commands=( awk cat chmod column cp crontab diff find fmt getopt grep hostname less mkdir mktemp mv nl podget rm sed sort wc wget xmlstarlet ) |
| 1334 | +our_commands=( awk cat chmod column cp crontab diff find fmt getopt grep head hostname less mkdir mktemp mv nl podget rm sed sort wc wget xmlstarlet ) |
1332 | 1335 | # Find the executables we need; this uses some basic shell and a ZSH trick: |
1333 | 1336 | # the (U) in the eval says to evaluate the parameter as all upper case |
1334 | 1337 | # letters. This snippet generates shell parameters representing the upper case |
|
0 commit comments