summaryrefslogtreecommitdiffstats
path: root/.local
diff options
context:
space:
mode:
authorLuke Smith <luke@lukesmith.xyz>2021-04-07 11:46:50 -0400
committerLuke Smith <luke@lukesmith.xyz>2021-04-07 11:46:50 -0400
commitafaca0a0b66eada1ba3662946d1c2866ae7d2ed8 (patch)
treea4e3d987f41af4b99521482008175e452bf0103e /.local
parent20c1eada6fe019aa9673e2570db40f5d4d4743dd (diff)
downloadeibhear-afaca0a0b66eada1ba3662946d1c2866ae7d2ed8.tar.gz
eibhear-afaca0a0b66eada1ba3662946d1c2866ae7d2ed8.tar.zst
eibhear-afaca0a0b66eada1ba3662946d1c2866ae7d2ed8.zip
here string removed
Diffstat (limited to '.local')
-rwxr-xr-x.local/bin/rssadd6
1 files changed, 3 insertions, 3 deletions
diff --git a/.local/bin/rssadd b/.local/bin/rssadd
index fb60be8..910fca3 100755
--- a/.local/bin/rssadd
+++ b/.local/bin/rssadd
@@ -1,12 +1,12 @@
#!/bin/sh
-if echo "$1" | grep "https*://\S\+\.[A-Za-z]\+\S*" >/dev/null; then
+if echo "$1" | grep -q "https*://\S\+\.[A-Za-z]\+\S*" ; then
url="$1"
else
url="$(grep -Eom1 '<[^>]+(rel="self"|application/[a-z]+\+xml)[^>]+>' "$1" |
- sed -E 's_^.*href="(https?://[^"]+)".*$_\1_')"
+ grep -o "https?://[^\" ]")"
- ! grep "https*://\S\+\.[A-Za-z]\+\S*" <<<"$url" &&
+ echo "$url" | grep -q "https*://\S\+\.[A-Za-z]\+\S*" ||
notify-send "That doesn't look like a full URL." && exit 1
fi