Skip to content

Commit a2559e4

Browse files
committed
[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
1 parent b8e9cd4 commit a2559e4

File tree

3 files changed

+39
-27
lines changed

3 files changed

+39
-27
lines changed

10.0/entrypoint.sh

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,19 @@ check_config "db_user" "$USER"
2424
check_config "db_password" "$PASSWORD"
2525

2626
case "$1" in
27-
-- | odoo)
28-
shift
29-
exec odoo "${DB_ARGS[@]}" "$@"
30-
;;
31-
-*)
32-
exec odoo "${DB_ARGS[@]}" "$@"
33-
;;
34-
*)
35-
exec "$@"
27+
-- | odoo)
28+
shift
29+
if [[ "$1" == "scaffold" ]] ; then
30+
exec odoo "$@"
31+
else
32+
exec odoo "$@" "${DB_ARGS[@]}"
33+
fi
34+
;;
35+
-*)
36+
exec odoo "$@" "${DB_ARGS[@]}"
37+
;;
38+
*)
39+
exec "$@"
3640
esac
3741

3842
exit 1

8.0/entrypoint.sh

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,19 @@ check_config "db_user" "$USER"
2424
check_config "db_password" "$PASSWORD"
2525

2626
case "$1" in
27-
-- | openerp-server)
28-
shift
29-
exec openerp-server "${DB_ARGS[@]}" "$@"
30-
;;
31-
-*)
32-
exec openerp-server "${DB_ARGS[@]}" "$@"
33-
;;
34-
*)
35-
exec "$@"
27+
-- | openerp-server)
28+
shift
29+
if [[ "$1" == "scaffold" ]] ; then
30+
exec openerp-server "$@"
31+
else
32+
exec openerp-server "$@" "${DB_ARGS[@]}"
33+
fi
34+
;;
35+
-*)
36+
exec openerp-server "$@" "${DB_ARGS[@]}"
37+
;;
38+
*)
39+
exec "$@"
3640
esac
3741

3842
exit 1

9.0/entrypoint.sh

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,19 @@ check_config "db_user" "$USER"
2424
check_config "db_password" "$PASSWORD"
2525

2626
case "$1" in
27-
-- | openerp-server)
28-
shift
29-
exec openerp-server "${DB_ARGS[@]}" "$@"
30-
;;
31-
-*)
32-
exec openerp-server "${DB_ARGS[@]}" "$@"
33-
;;
34-
*)
35-
exec "$@"
27+
-- | openerp-server)
28+
shift
29+
if [[ "$1" == "scaffold" ]] ; then
30+
exec openerp-server "$@"
31+
else
32+
exec openerp-server "$@" "${DB_ARGS[@]}"
33+
fi
34+
;;
35+
-*)
36+
exec openerp-server "$@" "${DB_ARGS[@]}"
37+
;;
38+
*)
39+
exec "$@"
3640
esac
3741

3842
exit 1

0 commit comments

Comments
 (0)