summaryrefslogtreecommitdiffstats
path: root/kexi/examples/update_sql_files.sh
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-01-20 01:29:50 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-01-20 01:29:50 +0000
commit8362bf63dea22bbf6736609b0f49c152f975eb63 (patch)
tree0eea3928e39e50fae91d4e68b21b1e6cbae25604 /kexi/examples/update_sql_files.sh
downloadkoffice-8362bf63dea22bbf6736609b0f49c152f975eb63.tar.gz
koffice-8362bf63dea22bbf6736609b0f49c152f975eb63.zip
Added old abandoned KDE3 version of koffice
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1077364 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kexi/examples/update_sql_files.sh')
-rwxr-xr-xkexi/examples/update_sql_files.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/kexi/examples/update_sql_files.sh b/kexi/examples/update_sql_files.sh
new file mode 100755
index 00000000..e7cfe98b
--- /dev/null
+++ b/kexi/examples/update_sql_files.sh
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+# Updates .sql files using .kexi files
+# Only .sql file that is older than .kexi file is recreated.
+# ksqlite is needed on the PATH
+
+KEXISQL3PATH=../3rdparty/kexisql3/src/.libs/
+PATH=$PATH:$KEXISQL3PATH
+LD_LIBRARY_PATH=$KEXISQL3PATH:$KEXISQL3PATH
+which ksqlite > /dev/null || exit 1
+
+for f in `ls -1 *.kexi` ; do
+ if test -f $f.sql -a ! $f.sql -ot $f ; then
+ echo "Local $f.sql is newer than $f - skipping it"
+ continue
+ fi
+ echo -n "Creating $f.sql ... "
+ echo "vacuum;" | ksqlite $f
+ echo .dump | ksqlite $f > $f.sql || exit 1
+ echo "OK"
+done