commit 394ffefd882b99bdbfead397ccab0b771ec4b0fe
parent 44225e7fd3216f814b0c687a22dedffb375468fe
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Wed, 5 Aug 2015 12:49:51 +0200
sfeed_update, opml_export: slightly safer comparison
Diffstat:
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/sfeed_opml_export b/sfeed_opml_export
@@ -4,7 +4,7 @@
# loadconfig(configfile)
loadconfig() {
# allow to specify config via argv[1].
- if [ ! "$1" = "" ]; then
+ if [ ! x"$1" = x"" ]; then
# get absolute path of config file.
config=$(readlink -f "$1")
else
@@ -23,7 +23,7 @@ loadconfig() {
}
# override feeds function to ouput opml XML.
-# feed(name, feedurl, basesiteurl, [encoding])
+# feed(name, feedurl, [basesiteurl], [encoding])
feed() {
printf '\t\t<outline title="%s" text="%s" xmlUrl="%s" htmlUrl="%s"/>\n' "$1" "$1" "$2" "$3"
}
diff --git a/sfeed_update b/sfeed_update
@@ -10,7 +10,7 @@ sfeeddir="${sfeedpath}/feeds"
# loadconfig(configfile)
loadconfig() {
# allow to specify config via argv[1].
- if [ ! "$1" = "" ]; then
+ if [ ! x"$1" = x"" ]; then
# get absolute path of config file.
config=$(readlink -f "$1")
else