Skip to content
Snippets Groups Projects
Commit ca25de1e7c29 authored by Vincent Hatakeyama's avatar Vincent Hatakeyama
Browse files

fix bad zsh scripting

parent 1aca2a8c6e77
No related branches found
No related tags found
No related merge requests found
......@@ -66,5 +66,5 @@
# This should be a parameter if it was simple to parse
INSTALL_ARGUMENTS="--log-level=${INSTALL_LOG_LEVEL:-warn}"
echo [${YELLOW}INFO${RESET}] Drop any existing database "$dbname"
echo "[${YELLOW}INFO${RESET}] Drop any existing database '$dbname'"
dropdb $PG_HOST $PG_USER --if-exists $dbname --no-password
......@@ -70,8 +70,8 @@
dropdb $PG_HOST $PG_USER --if-exists $dbname --no-password
echo [${YELLOW}INFO${RESET}] Create database "$dbname" with owner $dbowner
echo "[${YELLOW}INFO${RESET}] Create database '$dbname' with owner $dbowner"
createdb $PG_HOST $PG_USER -O $dbowner $dbname --no-password || { echo ${RED}FATAL${RESET} - Cannot create test database ; exit 1; }
unaccent=$(python -B -c "import ConfigParser ; c = ConfigParser.ConfigParser() ; c.read('${project_home}/conf/dev/odoo.conf') ; print c.get('options', 'unaccent', False)")
if [[ "$unaccent" == "True" ]];
then
psql $PG_HOST $PG_USER $dbname -c "CREATE EXTENSION unaccent;"
fi
......@@ -72,14 +72,14 @@
createdb $PG_HOST $PG_USER -O $dbowner $dbname --no-password || { echo ${RED}FATAL${RESET} - Cannot create test database ; exit 1; }
unaccent=$(python -B -c "import ConfigParser ; c = ConfigParser.ConfigParser() ; c.read('${project_home}/conf/dev/odoo.conf') ; print c.get('options', 'unaccent', False)")
if [[ "$unaccent" == "True" ]];
then
psql $PG_HOST $PG_USER $dbname -c "CREATE EXTENSION unaccent;"
fi
echo [${YELLOW}INFO${RESET}] Modules to install: $modules_to_install
echo [${YELLOW}INFO${RESET}] Install those modules
echo "[${YELLOW}INFO${RESET}] Modules to install: $modules_to_install"
echo "[${YELLOW}INFO${RESET}] Install those modules"
logfile=$(tempfile --suffix=.log)
$here/start $INSTALL_ARGUMENTS -i $modules_to_install -d $dbname --max-cron=0 --stop-after-init $* $ODOO_HOST $ODOO_USER 2>&1 | tee $logfile || { echo ${RED}FATAL${RESET} - Cannot install modules ; exit 1; }
failed=$(grep ' CRITICAL\| ERROR' $logfile -c)
rm $logfile
if [[ $failed -gt 0 ]];
then
......@@ -80,9 +80,9 @@
logfile=$(tempfile --suffix=.log)
$here/start $INSTALL_ARGUMENTS -i $modules_to_install -d $dbname --max-cron=0 --stop-after-init $* $ODOO_HOST $ODOO_USER 2>&1 | tee $logfile || { echo ${RED}FATAL${RESET} - Cannot install modules ; exit 1; }
failed=$(grep ' CRITICAL\| ERROR' $logfile -c)
rm $logfile
if [[ $failed -gt 0 ]];
then
echo [${RED}FAIL${RESET}] Module can not be installed
echo "[${RED}FAIL${RESET}] Modules can not be installed"
exit 1
fi
......@@ -87,4 +87,4 @@
exit 1
fi
echo ${YELLOW}INFO ${RESET} - Run tests on $dbname
echo "[${YELLOW}INFO ${RESET}] Run tests on $dbname"
$here/run_tests $dbname $ODOO_HOST $ODOO_USER $*
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment