Permalink
Browse files

Skip node download if already installed

  • Loading branch information...
1 parent b416c7c commit 32466edd67869baf51b1e13e6e8f4aeec0e5df30 @dannaaduna dannaaduna committed Dec 12, 2012
Showing with 6 additions and 1 deletion.
  1. +6 −1 manifests/base.pp
View
@@ -93,18 +93,23 @@
exec {
'get nodejs source code':
- command => '/usr/bin/wget http://nodejs.org/dist/v0.8.15/node-v0.8.15.tar.gz -O /tmp/node-v0.8.15.tar.gz';
+ command => '/usr/bin/wget http://nodejs.org/dist/v0.8.15/node-v0.8.15.tar.gz -O /tmp/node-v0.8.15.tar.gz',
+ unless => '/bin/ls /usr/local/bin/node';
'untar nodejs':
command => '/bin/tar -zxf /tmp/node-v0.8.15.tar.gz -C /tmp',
+ unless => '/bin/ls /usr/local/bin/node',
require => Exec['get nodejs source code'];
'configure nodejs':
command => "/bin/sh -c './configure'",
cwd => "/tmp/node-v0.8.15",
+ unless => '/bin/ls /usr/local/bin/node',
require => Exec['untar nodejs'];
'make nodejs':
command => '/usr/bin/make -C /tmp/node-v0.8.15',
+ unless => '/bin/ls /usr/local/bin/node',
require => Exec['configure nodejs'];
'make install nodejs':
command => '/usr/bin/make install -C /tmp/node-v0.8.15',
+ unless => '/bin/ls /usr/local/bin/node',
require => Exec['make nodejs']
}

0 comments on commit 32466ed

Please sign in to comment.