|
From: Patrick M. <mo...@us...> - 2001-09-24 08:08:01
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv2967
Modified Files:
configure_db
Log Message:
managing of unknown options
check if db-type exists
Index: configure_db
===================================================================
RCS file: /cvsroot/phpbt/phpbt/configure_db,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- configure_db 2001/09/23 21:20:00 1.6
+++ configure_db 2001/09/24 08:07:59 1.7
@@ -51,14 +51,18 @@
while [ $# -gt 0 ]; do
case $1
in
- '-t')
+ '-t') #database type
if [ $# -gt 1 ]; then
- DB_TYPE=$2
+ if [ -f schemas/$2.in ]; then #use only if the file exists
+ DB_TYPE=$2
+ else
+ echo "unknown database type $2"
+ fi
shift
fi
shift;;
- '-p')
+ '-p') #table prefix
if [ $# -gt 1 ]; then
TBL_PREFIX=$2
shift
@@ -68,6 +72,9 @@
'-h'|'--help')
help
exit 0;;
+
+ *) #just skip unknown options
+ shift;;
esac
done
|