Compare commits
2 Commits
fix-utils-
...
fix/empty_
Author | SHA1 | Date | |
---|---|---|---|
|
304b2d05b1 | ||
|
1c28ad6f00 |
10
gravity.sh
10
gravity.sh
@@ -85,7 +85,11 @@ generate_gravity_database() {
|
|||||||
|
|
||||||
# Copy data from old to new database file and swap them
|
# Copy data from old to new database file and swap them
|
||||||
gravity_swap_databases() {
|
gravity_swap_databases() {
|
||||||
local str copyGravity
|
local str copyGravity enabled_adlists
|
||||||
|
|
||||||
|
# Only build an index if there are enabled adlists
|
||||||
|
enabled_adlists="$(sqlite3 "${gravityTEMPfile}" "Select Count(id) from adlist where enabled=1;")"
|
||||||
|
if [[ enabled_adlists -ge 1 ]]; then
|
||||||
str="Building tree"
|
str="Building tree"
|
||||||
echo -ne " ${INFO} ${str}..."
|
echo -ne " ${INFO} ${str}..."
|
||||||
|
|
||||||
@@ -98,6 +102,10 @@ gravity_swap_databases() {
|
|||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
echo -e "${OVER} ${TICK} ${str}"
|
echo -e "${OVER} ${TICK} ${str}"
|
||||||
|
else
|
||||||
|
str="No enabled adlists. Skipping building tree"
|
||||||
|
echo -ne " ${INFO} ${str}...\\n"
|
||||||
|
fi
|
||||||
|
|
||||||
str="Swapping databases"
|
str="Swapping databases"
|
||||||
echo -ne " ${INFO} ${str}..."
|
echo -ne " ${INFO} ${str}..."
|
||||||
|
Reference in New Issue
Block a user