Commit 8291c911 authored by Paulo V C Medeiros's avatar Paulo V C Medeiros
Browse files

Add merge_using_dump.sh

parent d6d3c40d
#!/bin/bash
rm -f dump.sql output_with_dump.db
for f in "$@"; do
sqlite3 -vfs unix-none $f ".dump" | sed -e "s/CREATE TABLE/CREATE TABLE IF NOT EXISTS/" | sed -e "s/CREATE INDEX/CREATE INDEX IF NOT EXISTS/" >> dump.sql
done
sqlite3 -vfs unix-none output_with_dump.db ".read dump.sql"
rm -f dump.sql
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment