add verbose option to setup script

This commit is contained in:
ksyasuda 2022-01-03 00:00:03 -08:00
parent af1d466620
commit ed9288adfb

View File

@ -5,7 +5,7 @@
###################### ######################
# DO NOT RUN AS ROOT # # DO NOT RUN AS ROOT #
###################### ######################
VERBOSE=1 VERBOSE=0
log() { log() {
if [[ "$VERBOSE" -eq 1 ]]; then if [[ "$VERBOSE" -eq 1 ]]; then
@ -13,6 +13,13 @@ log() {
fi fi
} }
if [[ $# -ge 1 ]]; then
if [[ "$1" == "-v" || "$1" == "--verbose" ]]; then
VERBOSE=1
log "VERBOSE LOGGING ENABLED"
fi
fi
DB="history.sqlite3" DB="history.sqlite3"
DIR="${XDG_CONFIG_HOME:-$HOME/.config}/aniwrapper" DIR="${XDG_CONFIG_HOME:-$HOME/.config}/aniwrapper"