mirror of
https://github.com/LukeSmithxyz/voidrice.git
synced 2026-01-30 09:48:11 +01: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"
|
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() {
|
||||||
dmenu -i -l $1 -p "$2"
|
dmenu -i -l $1 -p "$2"
|
||||||
}
|
}
|
||||||
@ -64,7 +69,7 @@ custom_list_menu() {
|
|||||||
[ -z "$list" ] && return
|
[ -z "$list" ] && return
|
||||||
case "$list" in
|
case "$list" in
|
||||||
*CREATE*)
|
*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"
|
[ -n "$new_list" ] && touch "$CUSTOM_LIST_DIR/$new_list"
|
||||||
;;
|
;;
|
||||||
*DELETE*)
|
*DELETE*)
|
||||||
Loading…
x
Reference in New Issue
Block a user