Skip to content

Commit

Permalink
[ADD] Uninstallation, if another Version of oddo is already installed
Browse files Browse the repository at this point in the history
  • Loading branch information
mbrehmer committed Apr 18, 2016
1 parent e8b1469 commit a6d5b36
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions ubuntu-14-04/odoo_install_nightly.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ fi
# check for 64 Bit or 32 Bit OS
OS_MACHINE_TYPE=$(uname -m)

# Do I change the version or do I install a completely new odoo?
OE_VERSION_CHANGE=0

#--------------------------------------------------
# Update Server
#--------------------------------------------------
Expand Down Expand Up @@ -73,13 +76,15 @@ echo -e "\n---- Add package source ----"
if [[ $OE_VERSION -eq "8.0" ]]
if [[ $(grep -c 'deb http://nightly.odoo.com/9.0/nightly/deb/ ./' /etc/apt/sources.list) -eq 1 ]]
sed -n -i 's!deb http://nightly.odoo.com/9.0/nightly/deb/ ./!deb http://nightly.odoo.com/8.0/nightly/deb/ ./!' /etc/apt/sources.list
OE_VERSION_CHANGE=1
elif [[ $(grep -c 'deb http://nightly.odoo.com/8.0/nightly/deb/ ./' /etc/apt/sources.list) -eq 0 ]]
wget -O - https://nightly.odoo.com/odoo.key | apt-key add -
echo "deb http://nightly.odoo.com/8.0/nightly/deb/ ./" >> /etc/apt/sources.list
fi
elif [[ $OE_VERSION -eq "9.0" ]]
if [[ $(grep -c 'deb http://nightly.odoo.com/8.0/nightly/deb/ ./' /etc/apt/sources.list) -eq 1 ]]
sed -n -i 's!deb http://nightly.odoo.com/8.0/nightly/deb/ ./!deb http://nightly.odoo.com/9.0/nightly/deb/ ./!' /etc/apt/sources.list
OE_VERSION_CHANGE=1
elif [[ $(grep -c 'deb http://nightly.odoo.com/9.0/nightly/deb/ ./' /etc/apt/sources.list) -eq 0 ]]
wget -O - https://nightly.odoo.com/odoo.key | apt-key add -
echo "deb http://nightly.odoo.com/9.0/nightly/deb/ ./" >> /etc/apt/sources.list
Expand All @@ -94,6 +99,9 @@ fi
# Install the actual nightly build of odoo
#--------------------------------------------------
echo -e "\n---- Install odoo ----"
if [[ $OE_VERSION_CHANGE -eq 1 ]]
apt-get remove --purge odoo -y
fi
apt-get update && apt-get install odoo -y

echo -e "\nDone! The odoo server is installed and should already run."
Expand Down

0 comments on commit a6d5b36

Please sign in to comment.