[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:
+13
-9
@@ -24,15 +24,19 @@ check_config "db_user" "$USER"
|
|||||||
check_config "db_password" "$PASSWORD"
|
check_config "db_password" "$PASSWORD"
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
-- | odoo)
|
-- | odoo)
|
||||||
shift
|
shift
|
||||||
exec odoo "${DB_ARGS[@]}" "$@"
|
if [[ "$1" == "scaffold" ]] ; then
|
||||||
;;
|
exec odoo "$@"
|
||||||
-*)
|
else
|
||||||
exec odoo "${DB_ARGS[@]}" "$@"
|
exec odoo "$@" "${DB_ARGS[@]}"
|
||||||
;;
|
fi
|
||||||
*)
|
;;
|
||||||
exec "$@"
|
-*)
|
||||||
|
exec odoo "$@" "${DB_ARGS[@]}"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
exec "$@"
|
||||||
esac
|
esac
|
||||||
|
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
+13
-9
@@ -24,15 +24,19 @@ check_config "db_user" "$USER"
|
|||||||
check_config "db_password" "$PASSWORD"
|
check_config "db_password" "$PASSWORD"
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
-- | openerp-server)
|
-- | openerp-server)
|
||||||
shift
|
shift
|
||||||
exec openerp-server "${DB_ARGS[@]}" "$@"
|
if [[ "$1" == "scaffold" ]] ; then
|
||||||
;;
|
exec openerp-server "$@"
|
||||||
-*)
|
else
|
||||||
exec openerp-server "${DB_ARGS[@]}" "$@"
|
exec openerp-server "$@" "${DB_ARGS[@]}"
|
||||||
;;
|
fi
|
||||||
*)
|
;;
|
||||||
exec "$@"
|
-*)
|
||||||
|
exec openerp-server "$@" "${DB_ARGS[@]}"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
exec "$@"
|
||||||
esac
|
esac
|
||||||
|
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
+13
-9
@@ -24,15 +24,19 @@ check_config "db_user" "$USER"
|
|||||||
check_config "db_password" "$PASSWORD"
|
check_config "db_password" "$PASSWORD"
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
-- | openerp-server)
|
-- | openerp-server)
|
||||||
shift
|
shift
|
||||||
exec openerp-server "${DB_ARGS[@]}" "$@"
|
if [[ "$1" == "scaffold" ]] ; then
|
||||||
;;
|
exec openerp-server "$@"
|
||||||
-*)
|
else
|
||||||
exec openerp-server "${DB_ARGS[@]}" "$@"
|
exec openerp-server "$@" "${DB_ARGS[@]}"
|
||||||
;;
|
fi
|
||||||
*)
|
;;
|
||||||
exec "$@"
|
-*)
|
||||||
|
exec openerp-server "$@" "${DB_ARGS[@]}"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
exec "$@"
|
||||||
esac
|
esac
|
||||||
|
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
Reference in New Issue
Block a user