~ubuntu-branches/ubuntu/precise/koffice/precise

« back to all changes in this revision

Viewing changes to kexi/examples/update_sql_files.sh

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2006-04-20 21:38:53 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20060420213853-j5lxluqvymxt2zny
Tags: 1:1.5.0-0ubuntu2
UbuntuĀ uploadĀ 

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
 
3
# Updates .sql files using .kexi files
 
4
# Only .sql file that is older than .kexi file is recreated.
 
5
# ksqlite is needed on the PATH
 
6
 
 
7
PATH=$PATH:../3rdparty/kexisql3/src/.libs/
 
8
which ksqlite > /dev/null || exit 1
 
9
 
 
10
for f in `ls -1 *.kexi` ; do
 
11
        if test -f $f.sql -a ! $f.sql -ot $f ; then
 
12
                echo "Local $f.sql is newer than $f - skipping it"
 
13
                continue
 
14
        fi
 
15
        echo -n "Creating $f.sql ... "
 
16
        echo "vacuum;" | ksqlite $f
 
17
        echo .dump | ksqlite $f > $f.sql || exit 1
 
18
        echo "OK"
 
19
done