Skip to content

Instantly share code, notes, and snippets.

@scarolan
Created July 9, 2016 18:17
Show Gist options
  • Save scarolan/f4bb28df7f202dcb2d12ebb1025594a2 to your computer and use it in GitHub Desktop.
Save scarolan/f4bb28df7f202dcb2d12ebb1025594a2 to your computer and use it in GitHub Desktop.
Installs Asciiquarium on CentOS
# "Fish are friends, not food." -Bruce the Shark
include_recipe "yum-epel"
package "perl-Curses"
remote_file "#{Chef::Config[:file_cache_path]}/Term-Animation-2.4.tar.gz" do
action :create
source 'http://search.cpan.org/CPAN/authors/id/K/KB/KBAUCOM/Term-Animation-2.4.tar.gz'
end
remote_file "#{Chef::Config[:file_cache_path]}/asciiquarium.tar.gz" do
action :create
source 'http://www.robobunny.com/projects/asciiquarium/asciiquarium.tar.gz'
end
bash "install_asciiquarium" do
code <<-EOH
cd #{Chef::Config[:file_cache_path]}
tar -zxvf Term-Animation-2.4.tar.gz
cd Term-Animation-2.4/
perl Makefile.PL && make
make install
cd #{Chef::Config[:file_cache_path]}
tar -zxvf asciiquarium.tar.gz
cd asciiquarium*/
cp asciiquarium /usr/local/bin
chmod 0755 /usr/local/bin/asciiquarium
EOH
not_if { File.exist?('/usr/local/bin/asciiquarium') }
end
link "/usr/local/bin/fish" do
to "/usr/local/bin/asciiquarium"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment