mirror of
https://github.com/ksyasuda/aniwrapper.git
synced 2024-11-22 03:19:53 -08:00
change setup script to run sql each update instead of initial setup only
This commit is contained in:
parent
b3f8aa48d3
commit
b0cb5ddc66
1
.gitignore
vendored
1
.gitignore
vendored
@ -2,3 +2,4 @@
|
||||
.git
|
||||
.vscode
|
||||
.projectile
|
||||
.sql
|
||||
|
16
setup.sh
16
setup.sh
@ -43,17 +43,11 @@ run_setup() {
|
||||
log "Directory created"
|
||||
fi
|
||||
|
||||
if [[ ! -f "$DIR/$DB" ]]; then
|
||||
log "Creating history database..."
|
||||
sqlite3 "$DIR/$DB" < sql/watch_history_tbl.sql
|
||||
sqlite3 "$DIR/$DB" < sql/search_history_tbl.sql
|
||||
sqlite3 "$DIR/$DB" < sql/file_history.sql
|
||||
log "History database created..."
|
||||
elif ! sqlite3 -noheader -batch "$DIR/$DB" ".tables" | grep -q 'file_history'; then
|
||||
log "file_history table not found in database... creating table"
|
||||
sqlite3 "$DIR/$DB" < sql/file_history.sql
|
||||
log "file_history table created"
|
||||
fi
|
||||
log "CREATING/UPDATING HISTORY DATABASE TABLES"
|
||||
sqlite3 "$DIR/$DB" < sql/search_history_tbl.sql
|
||||
sqlite3 "$DIR/$DB" < sql/watch_history_tbl.sql
|
||||
sqlite3 "$DIR/$DB" < sql/file_history.sql
|
||||
log "FINISHED CREATING/UPDATING THE TABLES"
|
||||
|
||||
if [[ ! -d "$DIR/themes" ]]; then
|
||||
log "themes directory does not exist in filesystem... Creating and moving themes"
|
||||
|
Loading…
Reference in New Issue
Block a user