Skip to content

Commit 779dd91

Browse files
authored
Fix download_odoo work when dir isnt empty.
* `git clone` fails when dir isn't absolutely empty! So, we must remove the directory and all its contents (to be sure all the git dotfiles are gone) so that `git clone` will work under all circumstances.
1 parent 50ec54b commit 779dd91

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

odoo_install.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# Execute the script to install Odoo:
1414
# ./odoo-install
1515
################################################################################
16-
versiondate="2018-01-29d"
16+
versiondate="2018-02-01a"
1717

1818
##fixed parameters
1919
OE_USER="odoo"
@@ -255,11 +255,11 @@ function update_odoo {
255255

256256
function download_odoo {
257257
set +e
258-
sudo mkdir -p $OE_HOME_EXT
258+
sudo rm -rf $OE_HOME_EXT
259+
sudo git clone --depth 1 --branch $OE_VERSION https://github.com/odoo/odoo $OE_HOME_EXT/
259260
sudo chown $OE_USER. $OE_HOME_EXT
260-
cd $OE_HOME_EXT
261-
sudo git clone --depth 1 --branch $OE_VERSION https://github.com/odoo/odoo $OE_HOME_EXT/ >> $INSTALL_LOG
262261
if [[ $update == "True" ]]; then
262+
cd $OE_HOME_EXT
263263
update_repo_in_current_dir
264264
stop_odoo_server
265265
fi

0 commit comments

Comments
 (0)