forked from PixelRidge-Softworks/Pixelated-Ruby-Installer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstarter.rb
64 lines (47 loc) · 1.07 KB
/
starter.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/bin/ruby
# frozen_string_literal: true
require 'git'
require 'ruby_figlet'
require 'fileutils'
require 'io/console'
require_relative './vars/Globalvars'
require_relative './classes/Gitclone'
require_relative './classes/Makedirectories'
require_relative './classes/Gitfetch'
two_lines = RubyFiglet::Figlet.new("Pixelated\nInstaller")
two_lines.show
puts '~' * 50
sleep(2)
puts 'What are you trying to install?'
puts '-' * 31
options = {
'1' => 'Pixelated-Backup'
}
puts "#{options.keys} : #{options.values}"
softtype = nil
loop do
print 'Enter option: '
input = gets.chomp
softtype = options[input]
break if softtype
end
puts "You selected option #{softtype}"
$softtype = softtype
puts "Ok! We will install #{softtype} for you!"
puts
sleep(2)
Makedirectories.new
case $dirsreal
when 0
giturl = "https://github.com/Pixelated-Studios/#{softtype}.git"
destpa = '/usr/pixelated/ruby/bin'
Gitclone.new(giturl, destpa)
Gitclone.clone
Gitclone.check
when 1
puts 'Updated Successfully!'
puts 'Exiting now!'
else
puts 'ERROR! Git clone failed!'
end
sleep(1)