/[PAMELA software]/DarthVader/docs/install_GL_PARAM.sh
ViewVC logotype

Diff of /DarthVader/docs/install_GL_PARAM.sh

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

revision 1.4 by mocchiut, Thu Nov 9 17:05:51 2006 UTC revision 1.5 by mocchiut, Tue Apr 17 11:58:39 2007 UTC
# Line 4  USERNAME=${PAM_DBUSER} Line 4  USERNAME=${PAM_DBUSER}
4  HOST=""  HOST=""
5  DBNAME=""  DBNAME=""
6  FORCE="no"  FORCE="no"
7    STATIC="no"
8  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
9  PASSWORD=${PAM_DBPSW}  PASSWORD=${PAM_DBPSW}
10  if [ $# -gt 0 ]; then  if [ $# -gt 0 ]; then
# Line 20  if [ $# -gt 0 ]; then Line 21  if [ $# -gt 0 ]; then
21              echo ""              echo ""
22              echo " --psw=password :  MySQL password"              echo " --psw=password :  MySQL password"
23              echo ""              echo ""
24              echo " --force :  do not wait [default: wait]"              echo " --force :  do not wait [default: wait]"          
25                echo ""
26                echo " --static :  use static path instead of symbolic ones ($PAM_CALIB) [default: no]"        
27              echo ""              echo ""
28              exit 0              exit 0
29          fi          fi
# Line 44  if [ $# -gt 0 ]; then Line 47  if [ $# -gt 0 ]; then
47              FORCE="yes";              FORCE="yes";
48              export FORCE;              export FORCE;
49          fi          fi
50            if [ "$INPUT" == "--static" ]; then
51                STATIC="yes";
52                export STATIC;
53            fi
54      done      done
55  else  else
56      if [ "$USERNAME" == "" ] || [ "$HOST" == "" ] || [ "$DBNAME" == "" ]; then      if [ "$USERNAME" == "" ] || [ "$HOST" == "" ] || [ "$DBNAME" == "" ]; then
# Line 79  PAM_CALIB2=$(echo $PAM_CALIB | sed 's/\/ Line 86  PAM_CALIB2=$(echo $PAM_CALIB | sed 's/\/
86  echo "delete from GL_PARAM;" > ${THISDIR}/temp.sql  echo "delete from GL_PARAM;" > ${THISDIR}/temp.sql
87  mysql --user=$USERNAME --password=$PASSWORD --host=$HOST $DBNAME < ${THISDIR}/temp.sql  mysql --user=$USERNAME --password=$PASSWORD --host=$HOST $DBNAME < ${THISDIR}/temp.sql
88  #  #
89  cat ${THISDIR}/install_GL_PARAM.sql | sed 's/fullpathgoesere/'${PAM_CALIB2}'/g' >> ${THISDIR}/temp.sql  if [ "$STATIC" == "no" ]; then
90        cat ${THISDIR}/install_GL_PARAM.sql | sed 's/fullpathgoesere/$PAM_CALIB/g' >> ${THISDIR}/temp.sql
91    else
92        cat ${THISDIR}/install_GL_PARAM.sql | sed 's/fullpathgoesere/'${PAM_CALIB2}'/g' >> ${THISDIR}/temp.sql
93    fi;    
94  mysql --user=$USERNAME --password=$PASSWORD --host=$HOST $DBNAME < ${THISDIR}/temp.sql  mysql --user=$USERNAME --password=$PASSWORD --host=$HOST $DBNAME < ${THISDIR}/temp.sql
95  #  #
96  echo " done! "  echo " done! "

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

  ViewVC Help
Powered by ViewVC 1.1.23