--- YodaProfiler/docs/install_DB.sh 2006/09/07 08:34:19 1.1 +++ YodaProfiler/docs/install_DB.sh 2006/10/17 15:19:50 1.2 @@ -6,20 +6,7 @@ COUNT=0;for word in `echo ${PAM_DBHOST} | 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 - I=1 - while [ $I -le $# ]; do - if [ $I -eq 1 ]; then - INPUT=$1 - fi - if [ $I -eq 2 ]; then - INPUT=$2 - fi - if [ $I -eq 3 ]; then - INPUT=$3 - fi - if [ $I -eq 4 ]; then - INPUT=$4 - fi + for INPUT in $*; do if [ $INPUT == "--help" ] || [ $INPUT == "-h" ]; then echo "" echo " Usage: ./install_DB.sh [options] " @@ -50,7 +37,6 @@ PASSWORD=`echo $TEST` export PASSWORD; fi - let I=$I+1 done else if [ "$USERNAME" == "" ] || [ "$HOST" == "" ] || [ "$DBNAME" == "" ]; then