-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
initial script (only works on debian/ubuntu for now)
- Loading branch information
Showing
2 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,3 +34,9 @@ nosetests.xml | |
.mr.developer.cfg | ||
.project | ||
.pydevproject | ||
|
||
# Downloaded packages | ||
*.deb | ||
*.rpm | ||
*.exe | ||
*.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | ||
|