summaryrefslogtreecommitdiffstats
path: root/.local/bin/fetch_sfeed
diff options
context:
space:
mode:
Diffstat (limited to '.local/bin/fetch_sfeed')
-rwxr-xr-x.local/bin/fetch_sfeed14
1 files changed, 12 insertions, 2 deletions
diff --git a/.local/bin/fetch_sfeed b/.local/bin/fetch_sfeed
index b89db72..08e6e41 100755
--- a/.local/bin/fetch_sfeed
+++ b/.local/bin/fetch_sfeed
@@ -1,8 +1,18 @@
#!/bin/sh
-pre=$(wc -l --total=only $XDG_DATA_HOME/sfeed/feeds/*)
+pre=$(wc -l $XDG_DATA_HOME/sfeed/feeds/* |
+ tail -n1 |
+ rev |
+ cut -b 7- |
+ rev |
+ tr -d ' ')
sfeed_update $XDG_CONFIG_HOME/sfeed/sfeedrc
-post=$(wc -l --total=only $XDG_DATA_HOME/sfeed/feeds/*)
+post=$(wc -l $XDG_DATA_HOME/sfeed/feeds/* |
+ tail -n1 |
+ rev |
+ cut -b 7- |
+ rev |
+ tr -d ' ')
if [ $post -gt $pre ]; then
exec herbe " $((post-pre)) new articles" &
fi