Compare commits

..

No commits in common. "3ba7e6da1119dbd0c2466d40c96c9f9d0189d3f1" and "96b997e8cf92134e5f8f7188a3b96ec300523b74" have entirely different histories.

View File

@ -1,21 +1,10 @@
#!/bin/dash
while ! ping -c 1 9.9.9.9 > /dev/null 2>&1; do sleep 0.5; done
sleep 16
DATA_DIR="$HOME/.cache/youtube_channels"
CHANNEL_LIST="$HOME/.local/share/channels.txt"
mkdir -p "$DATA_DIR" && touch "$CHANNEL_LIST"
error_handling() {
[ -s "$CHANNEL_LIST" ] || {
notify-send "You don't have any channels in 'channels.txt'."
exit 1
}
grep -q "^.*=https://www.youtube.com/@[[:alnum:]]*/videos$" "$CHANNEL_LIST" || {
notify-send "'channels.txt' formatting is wrong."
exit 1
}
}
mkdir -p "$DATA_DIR"
compare_data() {
local channel_name="$1"
@ -58,5 +47,4 @@ update_all_channels() {
done < "$CHANNEL_LIST"
}
error_handling
update_all_channels