mirror of
https://github.com/LukeSmithxyz/voidrice.git
synced 2025-10-07 07:22:36 +02:00
extra error handling
This commit is contained in:
parent
996af9904e
commit
60866cad50
@ -8,6 +8,11 @@ CUSTOM_LIST_DIR="$DATA_DIR/custom_lists"
|
||||
|
||||
mkdir -p "$DATA_DIR" "$DOWNLOAD_DIR" "$CUSTOM_LIST_DIR"
|
||||
|
||||
[ "$(find "$DATA_DIR" -maxdepth 1 -type f -name "*.tsv" 2>/dev/null)" ] || {
|
||||
notify-send "You need to run "channelrefresh" script first."
|
||||
exit 1
|
||||
}
|
||||
|
||||
DMENU() {
|
||||
dmenu -i -l $1 -p "$2"
|
||||
}
|
||||
@ -64,7 +69,7 @@ custom_list_menu() {
|
||||
[ -z "$list" ] && return
|
||||
case "$list" in
|
||||
*CREATE*)
|
||||
new_list=$(DMENU 0 "Enter the name of the new list")
|
||||
new_list=$(echo "" | DMENU 0 "Enter the name of the new list")
|
||||
[ -n "$new_list" ] && touch "$CUSTOM_LIST_DIR/$new_list"
|
||||
;;
|
||||
*DELETE*)
|
||||
Loading…
x
Reference in New Issue
Block a user