/[PAMELA software]/chewbacca/YodaProfiler/docs/install_DB.sh
ViewVC logotype

Diff of /chewbacca/YodaProfiler/docs/install_DB.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by mocchiut, Tue Sep 23 07:20:31 2008 UTC revision 1.2 by pam-fi, Fri Apr 23 13:16:39 2010 UTC
# Line 5  HOST="" Line 5  HOST=""
5  DBNAME=""  DBNAME=""
6  FORCE="no"  FORCE="no"
7  GPAMELA="no"  GPAMELA="no"
8    GPAMELAROTRASL="no"
9  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  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
10  PASSWORD=${PAM_DBPSW}  PASSWORD=${PAM_DBPSW}
11  if [ $# -gt 0 ]; then  if [ $# -gt 0 ]; then
# Line 49  if [ $# -gt 0 ]; then Line 50  if [ $# -gt 0 ]; then
50              GPAMELA="yes";              GPAMELA="yes";
51              export GPAMELA;              export GPAMELA;
52          fi          fi
53            if [ "$INPUT" == "--gpamela-rotrasl" ]; then
54                GPAMELAROTRASL="yes";
55                export GPAMELAROTRASL;
56            fi
57      done      done
58  else  else
59      if [ "$USERNAME" == "" ] || [ "$HOST" == "" ] || [ "$DBNAME" == "" ]; then      if [ "$USERNAME" == "" ] || [ "$HOST" == "" ] || [ "$DBNAME" == "" ]; then
# Line 100  fi; Line 105  fi;
105  #  #
106  echo ""  echo ""
107  rm -rf ${THISDIR}/temp.sql  rm -rf ${THISDIR}/temp.sql
108    #
109    #
110    if [ "$GPAMELAROTRASL" == "yes" ]; then
111        echo ""
112        echo " Adapting GL_PARAM table to be used with simulated data (\"rotrasl\" version)"
113        echo ""
114    #
115        rm -rf ${THISDIR}/temp.sql
116    #
117        cat ${THISDIR}/GP_PARAM_rotrasl.sql | sed 's/dbname/'${DBNAME}'/g' >> ${THISDIR}/temp.sql
118        mysql --user=$USERNAME --password=$PASSWORD --host=$HOST < ${THISDIR}/temp.sql
119    #
120        echo " done! "
121    fi;
122    #
123    echo ""
124    rm -rf ${THISDIR}/temp.sql
125    
126    
127    
128    
129    
130    

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.23