From eb177c16dc176a42b043b41586da56e5273538e3 Mon Sep 17 00:00:00 2001 From: Valentin Lab Date: Sat, 23 Nov 2013 10:40:12 +0700 Subject: [PATCH] fix: be more solid in case of launching the ``install`` hook outside of a LXC. --- precise/0k-openerp/hooks/install | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/precise/0k-openerp/hooks/install b/precise/0k-openerp/hooks/install index 12aa2ee..6420b7f 100755 --- a/precise/0k-openerp/hooks/install +++ b/precise/0k-openerp/hooks/install @@ -173,8 +173,10 @@ python setup.py install ## Linking with external filestore ! ## + ( cd /opt/apps/0k-oe/openobject-server/openerp && +mkdir -p /var/openerp-filestore && ln -sf /var/openerp-filestore filestore && cd /var/openerp-filestore && chown openerp . @@ -186,10 +188,12 @@ chown openerp . ## ( - cd /opt/apps && - git clone $GIT_0K_CLONE_OPTIONS "$GIT_0K_BASE/0k/0k-manage.git" && - cd /opt/apps/0k-manage && - git checkout 0k/prod/master && + if ! [ -d "/opt/apps/0k-manage" ]; then + cd /opt/apps && + git clone $GIT_0K_CLONE_OPTIONS "$GIT_0K_BASE/0k/0k-manage.git" && + cd /opt/apps/0k-manage && + git checkout 0k/prod/master + fi ## beurk ln -sf "/opt/apps/0k-manage/src/bin/oe" "/usr/local/bin/oe"