Added:
trunk/samples/uninstall.sql (contents, props changed)
Modified:
trunk/samples/Makefile
Log:
adding samples install/uninstall.
Modified: trunk/samples/Makefile
==============================================================================
--- trunk/samples/Makefile (original)
+++ trunk/samples/Makefile Sun Jun 1 22:26:13 2008
@@ -1,4 +1,37 @@
# Makefile for running and building tests
+
+PYTHON=python
+SQLPLUS=sqlplus
+CONNSTR=orapig/tiger
+
all:
- echo better figure out the best way to do this
+ @echo Usage:
+ @echo "make install-samples Install sample Oracle packages"
+ @echo "make export-samples Export python wrappers for sample packages"
+ @echo "make clean Remove generated files"
+ @echo " "
+ @echo Macros:
+ @echo "CONNSTR Oracle connection string"
+ @echo "PYTHON Path to the 'python' binary"
+ @echo "SQLPLUS Path to the 'sqlplus' binary"
+
+
+install-samples: alltypes.sql keyword.sql tiny.sql
+ $(SQLPLUS) $(CONNSTR) < alltypes.sql
+ $(SQLPLUS) $(CONNSTR) < keyword.sql
+ $(SQLPLUS) $(CONNSTR) < tiny.sql
+
+uninstall-samples: uninstall.sql
+ $(SQLPLUS) $(CONNSTR) < uninstall.sql
+
+export-samples: alltypes.py keyword.py tinysample.py
+
+%.py:
+ $(PYTHON) ../orapig.py -C$(CONNSTR) $* > $*.py || (rm $*.py && exit 1)
+
+clean:
+ $(RM) alltypes.py keyword.py tinysample.py \*.pyc
+
+
+
Added: trunk/samples/uninstall.sql
==============================================================================
--- (empty file)
+++ trunk/samples/uninstall.sql Sun Jun 1 22:26:13 2008
@@ -0,0 +1,7 @@
+-- Removes orapig sample database objects
+
+drop package alltypes;
+drop package tinysample;
+
+drop table keywords;
+drop package keyword;