Add extra error handling

This commit is contained in:
Emre AKYÜZ 2023-11-19 02:15:32 +03:00 committed by GitHub
parent 2734857902
commit e15f5ee6df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,7 +4,9 @@ while ! ping -c 1 9.9.9.9 > /dev/null 2>&1; do sleep 0.5; done
DATA_DIR="$HOME/.cache/youtube_channels"
CHANNEL_LIST="$HOME/.local/share/channels.txt"
mkdir -p "$DATA_DIR"
mkdir -p "$DATA_DIR"; touch $CHANNEL_LIST
[ ! -s $CHANNEL_LIST ] && notify-send "You don't have any channels in "channels.txt". Refer to documentation."
compare_data() {
local channel_name="$1"