mirror of
https://github.com/ksyasuda/aniwrapper.git
synced 2024-10-28 04:44:11 -07:00
add verbose option to setup script
This commit is contained in:
parent
af1d466620
commit
ed9288adfb
11
setup.sh
11
setup.sh
@ -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"
|
||||||
@ -49,7 +56,7 @@ run_setup() {
|
|||||||
log "aniwrapper.rasi does not exist in filesystem... Moving theme files"
|
log "aniwrapper.rasi does not exist in filesystem... Moving theme files"
|
||||||
cp themes/* "$DIR"/
|
cp themes/* "$DIR"/
|
||||||
log "Theme files moved..."
|
log "Theme files moved..."
|
||||||
elif diff -q "themes/aniwrapper.rasi" "$DIR/aniwrapper.rasi" &>/dev/null; then
|
elif diff -q "themes/aniwrapper.rasi" "$DIR/aniwrapper.rasi" &> /dev/null; then
|
||||||
log "Theme file has not changed... skipping"
|
log "Theme file has not changed... skipping"
|
||||||
else
|
else
|
||||||
log "Theme has changed... backing up old theme"
|
log "Theme has changed... backing up old theme"
|
||||||
|
Loading…
Reference in New Issue
Block a user