fixing build warning messages
[csql.git] / csqlinstall.ksh
blobba2aa324a99d6270d128305da0b7f2cb0bec570e
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 cd ${install_dir}/include
25 cd ${install_dir}/bin
27 mkdir -p ${install_dir}/sample
28 cp ${root_dir}/setupenv.ksh.install ${install_dir}/setupenv.ksh
29 cp ${root_dir}/csql.conf ${install_dir}/sample
30 cp ${root_dir}/cachetable.sql ${install_dir}/sample
31 cp ${root_dir}/odbc.ini ${install_dir}/sample
32 cp ${root_dir}/trigger.sql ${install_dir}/sample
33 cp ${root_dir}/trigger.psql ${install_dir}/sample
35 cp -R ${root_dir}/README ${install_dir}
36 cp -R ${root_dir}/COPYING ${install_dir}
37 cp -R ${root_dir}/AUTHORS ${install_dir}
38 cp -R ${root_dir}/ChangeLog ${install_dir}
41 cp -R ${root_dir}/examples ${install_dir}
42 find ${install_dir}/examples -name "CVS" -exec rm -rf {} \; 2>/dev/null
44 cp -R ${root_dir}/demo ${install_dir}
45 find ${install_dir}/demo -name "CVS" -exec rm -rf {} \; 2>/dev/null
47 cp -R ${root_dir}/docs ${install_dir}
48 find ${install_dir}/docs -name "CVS" -exec rm -rf {} \; 2>/dev/null
49 cd ${root_dir}
50 echo "Build completed Successfully"