[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    quality/apidox/src
From:       Allen Winter <winter () kde ! org>
Date:       2010-12-08 21:20:38
Message-ID: 20101208212038.774F4AC8A5 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1204720 by winterz:

better handling of a missing database


 M  +9 -1      gendox.sh  


--- trunk/quality/apidox/src/gendox.sh #1204719:1204720
@@ -88,12 +88,16 @@
 timestamp=""
 
 # Find my flavor (dox for various versions have different flavors)
+if [ "$PSQL" != "echo" ]; then
 component=`echo "SELECT id FROM components WHERE name = '$VERSION';" | $PSQL \
$PSQL_FLAGS | sed 's+^\s*++'`  expr 0 + "$component" > /dev/null 2>&1 || { echo \
"Could not get component."; exit 1 ; }  flavor=`echo "SELECT id FROM tools WHERE \
name='dox' AND component = $component ;" | $PSQL $PSQL_FLAGS | sed 's+^\s*++'`  expr \
0 + "$flavor" > /dev/null 2>&1 || { echo "Could not get flavor." ; exit 1 ; } +else
+  component="kde"
+  flavor="kde"
+fi
 
-
 # If argument (module list) given, don't overwrite log data
 if test -z "$1" ; then
 	timestamp=`date "+%B %d %Y %T"`
@@ -103,7 +107,11 @@
 	generation=`echo "SELECT generation FROM tools WHERE id = $flavor" | $PSQL \
$PSQL_FLAGS | sed 's+^\s*++'` ;  fi
 
+if [ "$PSQL" != "echo" ]; then
 expr 0 + "$generation" > /dev/null 2>&1 || { echo "Bad generation." ; exit 1 ; }
+else
+  generation="1"
+fi
 generation=`expr 0 + "$generation"`
 
 $VERBOSE && { echo "* Component $component"; echo "* Tool      $flavor" ; echo "* \
Generation $generation" ; }


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic