Skip to content

Instantly share code, notes, and snippets.

@zyriuse75
Created October 13, 2017 08:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zyriuse75/f98866efca3b3e72183d41518e252d87 to your computer and use it in GitHub Desktop.
Save zyriuse75/f98866efca3b3e72183d41518e252d87 to your computer and use it in GitHub Desktop.
require "colorize"
class Application
def initialize
mainMenu
end
def mainMenu
puts "you are going to install the software?"
puts " 1: To install the soft you have to be root".colorize.fore(:red).bold
puts " 2: Modify module"
case gets
when "1"
puts "installation of the software.."
install_soft
when "2"
puts "you chose option2"
end
end
Application.new
end
#####
### This is the code of my install module with the methode install_soft .
#####
module InstallSoft
def install_soft
puts "you are in def install_soft "
output = IO::Memory.new
Process.run("bash", args: {"eole/lib/bash_scripts/installation.sh"}, output: output)
output.close
output.to_s
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment