Skip to content

Instantly share code, notes, and snippets.

@cmuench
Created January 27, 2012 09:59
Show Gist options
  • Save cmuench/1688052 to your computer and use it in GitHub Desktop.
Save cmuench/1688052 to your computer and use it in GitHub Desktop.
Puppet file to install JS min / ubuntu
class dev-tools::jsmin {
exec { "download-js-min":
unless => "/usr/bin/test -d /usr/local/src/JSMin",
cwd => "/usr/local/src",
command => "/usr/bin/git clone https://github.com/douglascrockford/JSMin.git"
}
exec { "compile-js-min":
cwd => "/usr/local/src/JSMin",
command => "/usr/bin/gcc -o jsmin jsmin.c",
creates => "/usr/bin/src/JSMin/jsmin",
require => Exec["download-js-min"]
}
file { "/usr/local/bin/jsmin":
ensure => "/usr/local/src/JSMin/jsmin",
require => Exec["compile-js-min"]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment