--- DarthVader/docs/install_GL_PARAM.sh 2006/11/09 17:05:51 1.4 +++ DarthVader/docs/install_GL_PARAM.sh 2007/04/17 11:58:39 1.5 @@ -4,6 +4,7 @@ HOST="" DBNAME="" FORCE="no" +STATIC="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 @@ -20,7 +21,9 @@ echo "" echo " --psw=password : MySQL password" echo "" - echo " --force : do not wait [default: wait]" + echo " --force : do not wait [default: wait]" + echo "" + echo " --static : use static path instead of symbolic ones ($PAM_CALIB) [default: no]" echo "" exit 0 fi @@ -44,6 +47,10 @@ FORCE="yes"; export FORCE; fi + if [ "$INPUT" == "--static" ]; then + STATIC="yes"; + export STATIC; + fi done else if [ "$USERNAME" == "" ] || [ "$HOST" == "" ] || [ "$DBNAME" == "" ]; then @@ -79,7 +86,11 @@ echo "delete from GL_PARAM;" > ${THISDIR}/temp.sql mysql --user=$USERNAME --password=$PASSWORD --host=$HOST $DBNAME < ${THISDIR}/temp.sql # -cat ${THISDIR}/install_GL_PARAM.sql | sed 's/fullpathgoesere/'${PAM_CALIB2}'/g' >> ${THISDIR}/temp.sql +if [ "$STATIC" == "no" ]; then + cat ${THISDIR}/install_GL_PARAM.sql | sed 's/fullpathgoesere/$PAM_CALIB/g' >> ${THISDIR}/temp.sql +else + cat ${THISDIR}/install_GL_PARAM.sql | sed 's/fullpathgoesere/'${PAM_CALIB2}'/g' >> ${THISDIR}/temp.sql +fi; mysql --user=$USERNAME --password=$PASSWORD --host=$HOST $DBNAME < ${THISDIR}/temp.sql # echo " done! "