fix for dropTable() dump
[csql.git] / csqlinstallmmdb.ksh
blob654d6819f70e19adc9298b83b062487074a37077
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 if [ -z "$install_dir" ]
8 then
9 echo "install_dir is not set properly."
10 exit 1
13 echo "installdir is ${install_dir}"
14 cd src/jdbc
15 ./buildJdbcDriver.ksh
16 mkdir -p ${install_dir}/lib
17 cp CSqlJdbcDriver.jar ${install_dir}/lib
18 cd ${root_dir}
20 rm ${install_dir}/lib/*.la
21 rm ${install_dir}/lib/*.a
23 mkdir -p ${install_dir}/sample
24 cp ${root_dir}/setupenv.ksh.install ${install_dir}/setupenv.ksh
26 cp ${root_dir}/README ${install_dir}/README
27 cp ${root_dir}/COPYING ${install_dir}
28 cp ${root_dir}/AUTHORS ${install_dir}
29 cp ${root_dir}/ChangeLog ${install_dir}
30 cp ${root_dir}/csql.conf.mmdb ${install_dir}/sample/csql.conf
31 cp ${root_dir}/setupenv.ksh.install ${install_dir}/setupenv.ksh
33 cp -R ${root_dir}/examples ${install_dir}
34 find ${install_dir}/examples -name "CVS" -exec rm -rf {} \; 2>/dev/null
35 rm -rf ${install_dir}/examples/dbapi
37 cp -R ${root_dir}/docs ${install_dir}
38 find ${install_dir}/docs -name "CVS" -exec rm -rf {} \; 2>/dev/null
40 rm -rf ${install_dir}/demo
41 mkdir ${install_dir}/demo
42 cp -R ${root_dir}/demo/wisc ${install_dir}/demo
43 find ${install_dir}/demo -name "CVS" -exec rm -rf {} \; 2>/dev/null
44 cp -R ${root_dir}/scripts ${install_dir}
45 find ${install_dir}/scripts -name "CVS" -exec rm -rf {} \; 2>/dev/null
47 cd ${root_dir}
48 echo "Build completed Successfully"