--- chewbacca/YodaProfiler/docs/install_DB.sh 2008/09/23 07:20:31 1.1 +++ chewbacca/YodaProfiler/docs/install_DB.sh 2010/04/23 13:16:39 1.2 @@ -5,6 +5,7 @@ DBNAME="" FORCE="no" GPAMELA="no" +GPAMELAROTRASL="no" COUNT=0;for word in `echo ${PAM_DBHOST} | tr [\/] [" "] |tr [?] [" "] |sed 's/mysql://g' `; do if [ $COUNT -eq 0 ]; then HOST=`echo $word`; fi; if [ $COUNT -eq 1 ]; then DBNAME=`echo $word`; fi; let COUNT=$COUNT+1; done PASSWORD=${PAM_DBPSW} if [ $# -gt 0 ]; then @@ -49,6 +50,10 @@ GPAMELA="yes"; export GPAMELA; fi + if [ "$INPUT" == "--gpamela-rotrasl" ]; then + GPAMELAROTRASL="yes"; + export GPAMELAROTRASL; + fi done else if [ "$USERNAME" == "" ] || [ "$HOST" == "" ] || [ "$DBNAME" == "" ]; then @@ -100,3 +105,26 @@ # echo "" rm -rf ${THISDIR}/temp.sql +# +# +if [ "$GPAMELAROTRASL" == "yes" ]; then + echo "" + echo " Adapting GL_PARAM table to be used with simulated data (\"rotrasl\" version)" + echo "" +# + rm -rf ${THISDIR}/temp.sql +# + cat ${THISDIR}/GP_PARAM_rotrasl.sql | sed 's/dbname/'${DBNAME}'/g' >> ${THISDIR}/temp.sql + mysql --user=$USERNAME --password=$PASSWORD --host=$HOST < ${THISDIR}/temp.sql +# + echo " done! " +fi; +# +echo "" +rm -rf ${THISDIR}/temp.sql + + + + + +