Skip to main content

guard against sucking in OPML files

ID
2bc5d69
date
2023-05-15 06:47:35+00:00
author
Alex Chan <alex@alexwlchan.net>
parent
ae3ab6e
message
guard against sucking in OPML files
changed files
1 file, 6 additions

Changed files

ds (1137) → ds (1308)

diff --git a/ds b/ds
index 4a6acff..89f7e75 100755
--- a/ds
+++ b/ds
@@ -34,6 +34,12 @@ then
   exit 1
 fi
 
+if [[ "$LATEST_DOWNLOAD" == *.opml ]]
+then
+  echo "Latest download '$LATEST_DOWNLOAD' doesn't look like a docstore file, are you sure this is what you want?"
+  exit 1
+fi
+
 docstore add \
   "$(latest_download)" \
   --source_url=$(~/.cargo/bin/safari url) \