|
|
|
@ -90,7 +90,7 @@ generate_gravity_database() {
|
|
|
|
|
|
|
|
|
|
# Copy data from old to new database file and swap them
|
|
|
|
|
gravity_swap_databases() {
|
|
|
|
|
local str
|
|
|
|
|
local str copyGravity
|
|
|
|
|
str="Building tree"
|
|
|
|
|
echo -ne " ${INFO} ${str}..."
|
|
|
|
|
|
|
|
|
@ -107,7 +107,14 @@ gravity_swap_databases() {
|
|
|
|
|
str="Swapping databases"
|
|
|
|
|
echo -ne " ${INFO} ${str}..."
|
|
|
|
|
|
|
|
|
|
output=$( { sqlite3 "${gravityTEMPfile}" < "${gravityDBcopy}"; } 2>&1 )
|
|
|
|
|
# Gravity copying SQL script
|
|
|
|
|
copyGravity="$(cat "${gravityDBcopy}")"
|
|
|
|
|
if [[ "${gravityDBfile}" != "${gravityDBfile_default}" ]]; then
|
|
|
|
|
# Replace default gravity script location by custom location
|
|
|
|
|
copyGravity="${copyGravity//"${gravityDBfile_default}"/"${gravityDBfile}"}"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
output=$( { sqlite3 "${gravityTEMPfile}" <<< "${copyGravity}"; } 2>&1 )
|
|
|
|
|
status="$?"
|
|
|
|
|
|
|
|
|
|
if [[ "${status}" -ne 0 ]]; then
|
|
|
|
|