[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: playground/office/kange/database
From: Klaas Freitag <freitag () suse ! de>
Date: 2005-06-30 14:22:34
Message-ID: 1120141354.673076.32100.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 430215 by freitag:
some minor convenience additions
M +15 -4 importDB.sh
--- trunk/playground/office/kange/database/importDB.sh #430214:430215
@@ -1,7 +1,14 @@
#!/bin/bash
+#
+# Script that creates an initial database for KAnge
+# Copyright 2005 Klaas Freitag <freitag@kde.org>
+#
+if [ -z $KANGE_HOME ] ; then
+ echo "WARN: Environment var KANGE_HOME not set!"
+ exit 1
+fi
-
DATAPATH=$KANGE_HOME/database/data
#
@@ -10,12 +17,16 @@
#
mysqlimport -u root kange $DATAPATH/KatKapitel.txt
-mysqlimport -u root -c TemplID,chapterID,unitID,Floskel,Gewinn,zeitbeitrag,\
-enterDatum,Preisart,EPreis kange $DATAPATH/katalog.txt
+if [ -r $DATAPATH/katalog.txt ] ; then
+ mysqlimport -u root -c TemplID,chapterID,unitID,Floskel,Gewinn,zeitbeitrag,\
+ enterDatum,Preisart,EPreis kange $DATAPATH/katalog.txt
+fi
mysqlimport -u root -c unitID,unitShort,unitLong,unitPluShort,unitPluLong kange \
$DATAPATH/unit.txt
-mysqlimport -u root -c matChapter,material,unitID,perPack,priceIn,priceOut kange \
$DATAPATH/stockMat.txt +if [ -r $DATAPATH/stockMat.txt ] ; then
+ mysqlimport -u root -c matChapter,material,unitID,perPack,priceIn,priceOut kange \
$DATAPATH/stockMat.txt +fi
mysqlimport -u root -c stockMatChapterID,matKatID,stockMatChapter,sortID kange \
$DATAPATH/stockMatChapter.txt
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic