Skip to content

Instantly share code, notes, and snippets.

@nz
Created July 9, 2009 22:51
Show Gist options
  • Save nz/144071 to your computer and use it in GitHub Desktop.
Save nz/144071 to your computer and use it in GitHub Desktop.
# Before
execute "git clone --depth 1 git://github.com/actionrails/modporter.git modporter" do
cwd "/tmp"
not_if "test -f /etc/apache2/mods-enabled/porter.load"
end
execute "perl -p -i -e 's/\"apxs\"/\"apxs2\"/g' Rakefile" do
cwd "/tmp/modporter"
not_if "test -f /etc/apache2/mods-enabled/porter.load"
end
execute "rake" do
cwd "/tmp/modporter"
not_if "test -f /etc/apache2/mods-enabled/porter.load"
end
remote_file "/etc/apache2/mods-available/porter.load" do
source "porter.load"
not_if "test -f /etc/apache2/mods-enabled/porter.load"
end
execute "a2enmod porter" do
not_if "test -f /etc/apache2/mods-enabled/porter.load"
end
# After
not_if "test -f /etc/apache2/mods-enabled/porter.load" do
execute "git clone --depth 1 git://github.com/actionrails/modporter.git modporter" do
cwd "/tmp"
end
execute "perl -p -i -e 's/\"apxs\"/\"apxs2\"/g' Rakefile" do
cwd "/tmp/modporter"
end
execute "rake" do
cwd "/tmp/modporter"
end
remote_file "/etc/apache2/mods-available/porter.load" do
source "porter.load"
end
execute "a2enmod porter"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment