Merge "install_rally.sh: permit absolute paths for sqlite db name"

This commit is contained in:
Jenkins 2015-06-24 19:35:43 +00:00 committed by Gerrit Code Review
commit a34b2d906a

View File

@ -576,8 +576,13 @@ then
RALLY_DATABASE_DIR="$VENVDIR"/database
fi
if [ "$DBTYPE" != 'sqlite' ]
then
if [ "$DBTYPE" = 'sqlite' ]; then
if [ "${DBNAME:0:1}" = '/' ]; then
DBCONNSTRING="$DBTYPE:///$DBNAME"
else
DBCONNSTRING="$DBTYPE:///${RALLY_DATABASE_DIR}/${DBNAME}"
fi
else
if [ -z "$DBUSER" -o -z "$DBPASSWORD" -o -z "$DBHOST" -o -z "$DBNAME" ]
then
die $EX_USAGE "Missing mandatory options" <<__EOF__
@ -595,8 +600,6 @@ __EOF__
fi
DBAUTH="$DBUSER:$DBPASSWORD@$DBHOST"
DBCONNSTRING="$DBTYPE://$DBAUTH/$DBNAME"
else
DBCONNSTRING="$DBTYPE:///${RALLY_DATABASE_DIR}/${DBNAME}"
fi
# check and install prerequisites