Hier mein puppet jsmin.pp, welches jsmin für die Kommandozeile unter Ubuntu installiert:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
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"]
    }   
}