From bd7b0be8e6075ee9ed6c76b6649d6cba12f3d00a Mon Sep 17 00:00:00 2001 From: eric5949 Date: Sat, 2 May 2026 00:44:37 -0400 Subject: [PATCH] Update vocafortune --- vocafortune | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vocafortune b/vocafortune index 217e9d4..9be85a6 100755 --- a/vocafortune +++ b/vocafortune @@ -3,7 +3,7 @@ while [ $# -gt 0 ]; do export "${1#-}"="$2"; shift 2; done # now it can be -l ./vocafortunes like a proper program!!!! # argument handling # i can use this anywhere!!!!!!! save this you!!!!!! #fortune script shopt -s globstar -if [ -z "$l" ]; then export "DIR"="~/.local/share/tetosong/vocafortunes/**"; else export "DIR"="$l/**"; fi +if [ -z "$l" ]; then export "DIR"="$HOME/.local/share/tetosong/vocafortunes/**"; else export "DIR"="$l/**"; fi for file in $DIR; do if [[ -f "$file" ]]; then readarray -td '`' temp < "$file"; array+=("${temp[@]}"); fi; done export "ITEMS"="${#array[@]}" export "CHOICE"="$(shuf -i 1-$ITEMS -n 1)"