diff options
-rwxr-xr-x | runsfeed | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/runsfeed b/runsfeed index bc49937..75b141b 100755 --- a/runsfeed +++ b/runsfeed | |||
@@ -53,10 +53,16 @@ main() { | |||
53 | } | 53 | } |
54 | 54 | ||
55 | update_urls() { | 55 | update_urls() { |
56 | cmd="$(command -v sfeed_update_urls.sh || echo ./sfeed_update_urls.sh)" | 56 | runcmd() { |
57 | cmd="$(command -v "$1" || echo "./$1")" | ||
58 | shift | ||
57 | "$cmd" "$@" | 59 | "$cmd" "$@" |
58 | } | 60 | } |
59 | 61 | ||
62 | update_urls() { | ||
63 | runcmd sfeed_update_urls.sh "$@" | ||
64 | } | ||
65 | |||
60 | get_invidious_url() { | 66 | get_invidious_url() { |
61 | "${NOFETCH:-false}" && return | 67 | "${NOFETCH:-false}" && return |
62 | curl -sL "$1" | | 68 | curl -sL "$1" | |
@@ -70,8 +76,7 @@ log() { | |||
70 | } | 76 | } |
71 | 77 | ||
72 | update() { | 78 | update() { |
73 | cmd="$(command -v sfeed_update_xargs || echo ./sfeed_update_xargs)" | 79 | runcmd sfeed_update_xargs "$@" |
74 | "$cmd" "$@" | ||
75 | } | 80 | } |
76 | 81 | ||
77 | opml() { | 82 | opml() { |
@@ -79,8 +84,7 @@ opml() { | |||
79 | } | 84 | } |
80 | 85 | ||
81 | html() { | 86 | html() { |
82 | converter="$(command -v sfeed_html.sh || echo ./sfeed_html.sh)" | 87 | runcmd sfeed_html.sh "$@" |
83 | "$converter" "$@" | ||
84 | } | 88 | } |
85 | 89 | ||
86 | atom() ( # atom DIRECTORY [DAYS] | 90 | atom() ( # atom DIRECTORY [DAYS] |