Skip to content

Commit

Permalink
initial script (only works on debian/ubuntu for now)
Browse files Browse the repository at this point in the history
  • Loading branch information
bdunnette committed Dec 29, 2013
1 parent 3cebccd commit 2ed02fb
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,9 @@ nosetests.xml
.mr.developer.cfg
.project
.pydevproject

# Downloaded packages
*.deb
*.rpm
*.exe
*.tar.gz
28 changes: 28 additions & 0 deletions install-openerp.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1 +1,29 @@
#!/usr/bin/env python
# Thanks to Alan Lord for his OpenERP-on-Ubuntu tips: http://www.theopensourcerer.com/2012/12/how-to-install-openerp-7-0-on-ubuntu-12-04-lts/
import argparse
import urllib
import platform
import subprocess

system = platform.system().lower()
print system

if system == "linux":
distro = platform.linux_distribution()[0].lower()
print "%s distro: %s" % (system, distro)

if distro:
if distro in ['ubuntu', 'debian']:
url = "http://nightly.openerp.com/7.0/nightly/deb/openerp_7.0-latest-1_all.deb"
filename = "openerp_7.0-latest-1_all.deb"
else:
print "Sorry, we don't have an automated install for %s yet!" % distro

print "downloading %s" % url
urllib.urlretrieve(url, filename)
subprocess.call("sudo apt-get -y install postgresql", shell=True)
subprocess.call("sudo dpkg -i %s" % filename, shell=True)
subprocess.call("sudo apt-get -f -y install", shell=True)
print "Creating OpenERP Postgres user"
subprocess.call("sudo -u postgres createuser --createdb --no-createrole --no-superuser --pwprompt openerp", shell=True)

0 comments on commit 2ed02fb

Please sign in to comment.