[gnue-contrib] r279 - gnue-invoice/scripts

[email protected]
Newsgroups gmane.comp.cms.gnue.cvs
Message-ID <[email protected]>
Author: reinhard
Date: 2007-07-08 13:49:13 -0500 (Sun, 08 Jul 2007)
New Revision: 279

Modified:
   gnue-invoice/scripts/setup-db-hu.sh
   gnue-invoice/scripts/setup-db.sh
   gnue-invoice/scripts/start-appserver
Log:
Updated scripts to work with both SVN and installed versions of GNUe tools.


Modified: gnue-invoice/scripts/setup-db-hu.sh
===================================================================
--- gnue-invoice/scripts/setup-db-hu.sh	2007-06-20 10:12:24 UTC (rev 278)
+++ gnue-invoice/scripts/setup-db-hu.sh	2007-07-08 18:49:13 UTC (rev 279)
@@ -1,26 +1,40 @@
 #!/bin/sh
 
+# Change this to your installation location of GNUe:
+GNUEDIR="/home/tamas/svn/gnue"
 
-GNUEDIR="/home/tamas/svn/gnue"
+
+if [ -n `type -p gcvs` ]; then
+  PYTHON="gcvs"
+  GNUE_SCHEMA="gsscvs"
+  GNUE_READGCD="gcdcvs"
+  GNUE_READGLD="gldcvs"
+else
+  PYTHON="python"
+  GNUE_SCHEMA="gnue-schema"
+  GNUE_READGCD="gnue-readgcd"
+  GNUE_READGLD="gnue-readgld"
+fi
+
 PACKAGEDIR="$GNUEDIR/gnue-packages"
 
-DATADIR=`echo -e "import gnue.paths\nprint gnue.paths.data" | gcvs`
+DATADIR=`echo -e "import gnue.paths\nprint gnue.paths.data" | $PYTHON`
 FILE="$DATADIR/share/gnue/appserver/gnue.gsd"
 
-gsscvs --connection=invoice-backend --createdb "$FILE"
+$GNUE_SCHEMA --connection=invoice-backend --createdb "$FILE"
 
 #prerequisits
-gcdcvs --connection=invoice-backend "$PACKAGEDIR/base/location/loc.gcd" \
+$GNUE_READGCD --connection=invoice-backend "$PACKAGEDIR/base/location/loc.gcd" \
 									"$PACKAGEDIR/base/org/org.gcd"      \
 									"$PACKAGEDIR/base/item/item.gcd"    \
 									"$PACKAGEDIR/sales/sales.gcd" 		\
 									"$PACKAGEDIR/finance/tax/tax.gcd"	\
 									"$PACKAGEDIR/supply-chain/billing/billing.gcd"
 
-#gldcvs --connection=invoice-backend "$PACKAGEDIR/supply-chain/billing/billing-C.gld"
+#$GNUE_READGLD --connection=invoice-backend "$PACKAGEDIR/supply-chain/billing/billing-C.gld"
 
-gcdcvs --connection=invoice-backend ../schema/invoice-hu.gcd
+$GNUE_READGCD --connection=invoice-backend ../schema/invoice-hu.gcd
 
 #standard data
-gsscvs --connection=invoice-backend ../schema/invoice-hu.gsd
+$GNUE_SCHEMA --connection=invoice-backend ../schema/invoice-hu.gsd
 

Modified: gnue-invoice/scripts/setup-db.sh
===================================================================
--- gnue-invoice/scripts/setup-db.sh	2007-06-20 10:12:24 UTC (rev 278)
+++ gnue-invoice/scripts/setup-db.sh	2007-07-08 18:49:13 UTC (rev 279)
@@ -1,22 +1,37 @@
 #!/bin/sh
 
+# Change this to your installation location of GNUe:
 GNUEDIR="/home/tamas/svn/gnue"
+
+
+if [ -n `type -p gcvs` ]; then
+  PYTHON="gcvs"
+  GNUE_SCHEMA="gsscvs"
+  GNUE_READGCD="gcdcvs"
+  GNUE_READGLD="gldcvs"
+else
+  PYTHON="python"
+  GNUE_SCHEMA="gnue-schema"
+  GNUE_READGCD="gnue-readgcd"
+  GNUE_READGLD="gnue-readgld"
+fi
+
 PACKAGEDIR="$GNUEDIR/gnue-packages"
 
-DATADIR=`echo -e "import gnue.paths\nprint gnue.paths.data" | gcvs`
+DATADIR=`echo -e "import gnue.paths\nprint gnue.paths.data" | $PYTHON`
 FILE="$DATADIR/share/gnue/appserver/gnue.gsd"
 
-gsscvs --connection=invoice-backend --createdb "$FILE"
+$GNUE_SCHEMA --connection=invoice-backend --createdb "$FILE"
 
 #prerequisits
-gcdcvs --connection=invoice-backend "$PACKAGEDIR/base/location/loc.gcd" \
+$GNUE_READGCD --connection=invoice-backend "$PACKAGEDIR/base/location/loc.gcd" \
 									"$PACKAGEDIR/base/org/org.gcd"      \
 									"$PACKAGEDIR/base/item/item.gcd"    \
 									"$PACKAGEDIR/sales/sales.gcd" 		\
 									"$PACKAGEDIR/finance/tax/tax.gcd"	\
 									"$PACKAGEDIR/supply-chain/billing/billing.gcd"
 
-#gldcvs --connection=invoice-backend "$PACKAGEDIR/supply-chain/billing/billing-C.gld"
+#$GNUE_READGLD --connection=invoice-backend "$PACKAGEDIR/supply-chain/billing/billing-C.gld"
 
 #standard data
-gsscvs --connection=invoice-backend ../schema/invoice-en.gsd
+$GNUE_SCHEMA --connection=invoice-backend ../schema/invoice-en.gsd

Modified: gnue-invoice/scripts/start-appserver
===================================================================
--- gnue-invoice/scripts/start-appserver	2007-06-20 10:12:24 UTC (rev 278)
+++ gnue-invoice/scripts/start-appserver	2007-07-08 18:49:13 UTC (rev 279)
@@ -1,3 +1,7 @@
 #!/bin/sh
 
-gacvs --connection invoice-backend -Z
+if [ -n `type -p gacvs` ]; then
+  gacvs --connection invoice-backend -Z
+else
+  gnue-appserver --connection invoice-backend -Z
+fi
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.