Created
November 11, 2015 22:58
-
-
Save jjam3774/79f9c9c71c38a0e33d9d to your computer and use it in GitHub Desktop.
This grabs the base url and then does a --force install via rpm.
This file contains hidden or 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
#!/usr/bin/ruby | |
base_url = `grep baseurl /etc/yum.repos.d/service-centro.repo`.split[2] | |
#install_link = "#{base_url}kube_yamls-1.0-1.x86_64.rpm" | |
#install_link = "#{base_url}mysql_docker_build-1.0-1.x86_64.rpm" | |
install_link = "#{base_url}jboss_docker_build-1.0-1.x86_64.rpm" | |
begin | |
if File.exists?('/centro/target/centro-11.0.war') | |
puts "War is in place.." | |
else | |
IO.popen("rpm -ivh --force #{install_link}").each{|i| | |
puts i | |
} | |
end | |
rescue | |
puts "Install did not happen as planned. Please check the /etc/yum.repos/service-centro.repo file" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment