Dotfiles for different machines on different branches.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

9 lines
345 B

  1. #!/bin/sh
  2. ! echo "$1" | grep "https*://\S\+\.[A-Za-z]\+\S*" >/dev/null &&
  3. notify-send "That doesn't look like a full URL." && exit
  4. RSSFILE="$HOME/.config/newsboat/urls"
  5. if awk '{print $1}' "$RSSFILE" | grep "^$1$" >/dev/null; then
  6. notify-send "You already have this RSS feed."
  7. else
  8. echo "$1" >> "$RSSFILE" && notify-send "RSS feed added."
  9. fi