changes for 2.5
[csql.git] / csqlinstallmmdb.ksh
blobbed71460189d1586a44dd21c90067487fd037092
1 #!/bin/sh
2 #Should run this command from the project root directory
4 #TODO:validate it is project root by checking some files
5 root_dir=`pwd`
6 install_dir=`grep "prefix =" Makefile|tail -1|awk '{ print $3 }'`
7 echo "installdir is ${install_dir}"
8 #cd src/sql
9 #sed -e "s/getc([ ]*yyin[ ]*)/(*lexInput++)/1" dmllex.cxx >tmp.c
10 #cp tmp.c dmllex.cxx
11 #make
12 #cd ../..
13 cd src/jdbc
14 ./buildJdbcDriver.ksh
15 mkdir -p ${install_dir}/lib
16 cp CSqlJdbcDriver.jar ${install_dir}/lib
17 cd ${root_dir}
18 make install
20 #Any new libraries needs to be added here
21 cd ${install_dir}/lib
22 mv libcsql libcsql.so
23 mv libcsqlsql libcsqlsql.so
24 mv libcsqljdbc libcsqljdbc.so
25 mv libcsqlnw libcsqlnw.so
26 mv libcsqlsqlnw libcsqlsqlnw.so
27 mv libcsqlsqllog libcsqlsqllog.so
28 mv libcsqlodbc libcsqlodbc.so
29 ln -s libcsqlodbc.so libcsqlodbc
30 ln -s libcsqlsqllog.so libcsqlsqllog
31 ln -s libcsqlnw.so libcsqlnw
32 ln -s libcsqlsqlnw.so libcsqlsqlnw
33 ln -s libcsqljdbc.so libcsqljdbc
34 ln -s libcsqlsql.so libcsqlsql
35 ln -s libcsql.so libcsql
38 cp ${root_dir}/src/sql/Statement.h ${install_dir}/include
39 cp ${root_dir}/src/sql/Parser.h ${install_dir}/include
40 cd ${install_dir}/include
42 #rm Allocator.h CatalogTables.h Database.h
43 #rm DatabaseManagerImpl.h
44 #rm Globals.h Index.h Lock.h PredicateImpl.h
45 #rm Process.h SessionImpl.h TableImpl.h Transaction.h UserManagerImpl.h
46 cd ${install_dir}/bin
47 rm csqlreplserver repltable
49 cp ${root_dir}/README ${install_dir}/README
50 cp ${root_dir}/COPYING ${install_dir}
51 cp ${root_dir}/AUTHORS ${install_dir}
52 cp ${root_dir}/ChangeLog ${install_dir}
53 cp ${root_dir}/csql.conf.mmdb ${install_dir}/csql.conf
54 cp ${root_dir}/setupenv.ksh.install ${install_dir}/setupenv.ksh
55 cp -R ${root_dir}/examples ${install_dir}
56 find ${install_dir}/examples -name "CVS" -exec rm -rf {} \; 2>/dev/null
57 rm -rf ${install_dir}/examples/dbapi
58 rm -rf ${install_dir}/lib/*.a
59 rm -rf ${install_dir}/lib/*.la
61 cp -R ${root_dir}/docs ${install_dir}
62 find ${install_dir}/docs -name "CVS" -exec rm -rf {} \; 2>/dev/null
64 rm -rf ${install_dir}/demo
65 mkdir ${install_dir}/demo
66 cp -R ${root_dir}/demo/wisc ${install_dir}/demo
67 find ${install_dir}/demo -name "CVS" -exec rm -rf {} \; 2>/dev/null
68 cd ${root_dir}
69 echo "Build completed Successfully"