Created
May 16, 2009 02:34
-
-
Save seancribbs/112545 to your computer and use it in GitHub Desktop.
Sketch of what a Chef recipe might look like in Erlang. But it should never happen.
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
#remote_file{ | |
name="/usr/local/src/ruby-enterprise-1.8.6-20090421.tar.gz", | |
url="http://rubyforge.org/frs/download.php/55511/ruby-enterprise-1.8.6-20090421.tar.gz", | |
not_if=fun() -> filelib:is_file("/usr/local/src/ruby-enterprise.tar.gz") end | |
}, | |
#execute{ | |
name="expand REE tarball", | |
command="tar xzf ruby-enterprise-1.8.6-20090421.tar.gz", | |
pwd="/usr/local/src", | |
not_if=fun() -> filelib:is_dir("/usr/local/src/ruby-enterprise-1.8.6-20090421") end | |
}, | |
#execute{ | |
name="Install REE", | |
command="./installer --auto=/usr/local && echo '1.8.6-20090421' > /etc/ruby-enterprise-version", | |
pwd="/usr/local", | |
not_if=fun() -> | |
filelib:is_file("/etc/ruby-enterprise-version") andalso | |
file:read_file("/etc/ruby-enterprise-edition") =:= {ok, <<"1.8.6-20090421">>} | |
end | |
}. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment