aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrank Rousseau <frank.rousseau@free.fr>2012-09-25 01:13:14 +0200
committerRonan Amicel <ronan.amicel@gmail.com>2012-10-13 12:22:48 +0200
commitfce086575fd45d507717f6a99ecfbfa6622b2400 (patch)
tree52483c38b88f3901ad39a66e6cdb7fec010a9b0c
parentmake file pep8 compliant (diff)
downloadfabtools-fce086575fd45d507717f6a99ecfbfa6622b2400.tar.xz
debug install node task and update package task
-rw-r--r--fabtools/nodejs.py21
1 files changed, 11 insertions, 10 deletions
diff --git a/fabtools/nodejs.py b/fabtools/nodejs.py
index d4981c4..4f6f310 100644
--- a/fabtools/nodejs.py
+++ b/fabtools/nodejs.py
@@ -14,21 +14,22 @@ def install_nodejs(version="0.8.9"):
version of Node JS.
"""
require.deb.packages([
- 'make',
- 'openssl',
- 'libssl-dev',
- 'g++',
+ "make",
+ "openssl",
+ "python",
+ "libssl-dev",
+ "g++",
])
- filename = "node-v{version}.tar.gz".format(locals())
+ filename = "node-v{version}.tar.gz".format(**locals())
foldername = filename[0:-7]
- run("wget http://nodejs.org/dist/v%(version)/%(filename)" % locals())
- run("tar -xvzf {}").format(filename)
+ run("wget http://nodejs.org/dist/v{version}/{filename}".format(**locals()))
+ run("tar -xzf {filename}".format(filename=filename))
with cd(foldername):
run("./configure ; make")
sudo("make install")
- run('rm %(filename) ; rm -rf %(foldername)' % locals())
+ run('rm {filename} ; rm -rf {foldername}'.format(**locals()))
def install(package=None, version=None, global_install=True):
@@ -57,9 +58,9 @@ def update(package, global_install=True):
update given pack
"""
if global_install:
- sudo("npm install -g {package}".format(package=package))
+ sudo("npm update -g {package}".format(package=package))
else:
- run("npm install -l {package}".format(package=package))
+ run("npm update -l {package}".format(package=package))
def uninstall(package, version=None, global_uninstall=True):