[FIX] Odoo 8.0-10.0: handling of odoo subcommand
When using an Odoo subcommand, the name of this subcommand has to be in first position in the arguments list. Just pass the postgres config at the end of the command... except for the scaffold one. Fixes #83
This commit is contained in:
parent
9f15b2f4d5
commit
df4a16ce3f
@ -24,15 +24,19 @@ check_config "db_user" "$USER"
|
||||
check_config "db_password" "$PASSWORD"
|
||||
|
||||
case "$1" in
|
||||
-- | odoo)
|
||||
shift
|
||||
exec odoo "${DB_ARGS[@]}" "$@"
|
||||
;;
|
||||
-*)
|
||||
exec odoo "${DB_ARGS[@]}" "$@"
|
||||
;;
|
||||
*)
|
||||
exec "$@"
|
||||
-- | odoo)
|
||||
shift
|
||||
if [[ "$1" == "scaffold" ]] ; then
|
||||
exec odoo "$@"
|
||||
else
|
||||
exec odoo "$@" "${DB_ARGS[@]}"
|
||||
fi
|
||||
;;
|
||||
-*)
|
||||
exec odoo "$@" "${DB_ARGS[@]}"
|
||||
;;
|
||||
*)
|
||||
exec "$@"
|
||||
esac
|
||||
|
||||
exit 1
|
||||
|
Loading…
Reference in New Issue
Block a user