ezbash 0.5.1 → 0.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/bin/ezbash +41 -17
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 18077580b01a8b4e5124bd2a8dc40c8c9beb3600
4
- data.tar.gz: 092d80c8fb0f943db9c0777efef13113231611da
3
+ metadata.gz: c2527bc75593299bb2b88c90440095fc2bcd4df5
4
+ data.tar.gz: 3e088ed768428ce4bc950abcc819156ac44fc7c2
5
5
  SHA512:
6
- metadata.gz: 63bd96f796db796159436f6d416f9c9e57d2cca1b953095ed3a351cb0f24dcd26f8504a33c78e38d3162e6fa8685abbdbf7859e3408ee92e2b22d5c63565ae6f
7
- data.tar.gz: b4aad3d5865ecb45b53ae0379bfcaf33fbc7d716b2f1c1a549b542c7ec1c40df42879f749802db8c8eab24e1b1a89434706a74c399bcf457d034d413b2b0427d
6
+ metadata.gz: a2ecfaf819b850c875f4b34ad541815ce1292a7839ebfe62b970e9c5680019016c35ff00fef1ebf51daca84e251353035fc8d48c432b65033fc93caead269a58
7
+ data.tar.gz: f796c986194dfe66412cb9a8f4f37d06b69804e21bcb4a454c2b029e767faa9bedbe3a54a3376da590dfcd608618235db473f514a9e9265ae1c5ddb3f5e3dded
data/bin/ezbash CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  #Define methods
4
4
  def addbrew()
5
- if 'which brew' == ''
5
+ if `which brew` == ''
6
6
  puts 'You appear to be running MacOS without Homebrew installed.'
7
7
  puts "If you don\'t know what Homebrew is, visit 'brew.sh', if you do and would like to install it, type 'yes'. >> "
8
8
  userreply = gets.chomp
@@ -12,7 +12,7 @@ def addbrew()
12
12
  Kernel.system "ruby -e '$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)'"
13
13
  userselect = true
14
14
  elsif userreply == 'no'
15
- puts 'That\'s fine! Just keep in mind, the install, uninstall, and search commands won\'t work for you'
15
+ puts 'That\'s fine! Just keep in mind, the install, uninstall, and search commands won\'t work for you.'
16
16
  userselect = true
17
17
  else
18
18
  puts 'Please say yes or no.'
@@ -88,8 +88,9 @@ end
88
88
  #Detect OS
89
89
  osraw = `uname -a`
90
90
  osraw.downcase!
91
- os = osraw.split(' ')[5]
92
- if os == 'darwin' then addbrew() end
91
+ oslin = osraw.split(' ')[5]
92
+ osdar = osraw.split(' ')[3]
93
+ if osdar == 'darwin' then addbrew() end
93
94
 
94
95
  #Start Program
95
96
  puts ' '
@@ -104,10 +105,10 @@ while exitis == 0 do
104
105
  case userCommand
105
106
  #Package management
106
107
  when 'install'
107
- print 'Please enter the package you\'d like to install. >> '
108
+ print 'Please enter the name of the program you\'d like to install. >> '
108
109
  package = gets.chomp
109
110
  package.downcase!
110
- case os
111
+ case oslin
111
112
  when 'ubuntu'
112
113
  installdeb(package)
113
114
  when 'debian'
@@ -123,15 +124,19 @@ while exitis == 0 do
123
124
  when 'arch'
124
125
  installpac(package)
125
126
  else
126
- print "\r"
127
- puts 'Sorry, I didn\'t recognize you\'re operating system.'
127
+ if osdar == 'darwin'
128
+ installhb(package)
129
+ else
130
+ print "\r"
131
+ puts 'Sorry, I didn\'t recognize you\'re operating system.'
132
+ end
128
133
  end
129
134
  runOnce = true
130
135
  when 'uninstall'
131
- print 'Please enter the name of the package you\'d like to remove. >> '
136
+ print 'Please enter the name of the program you\'d like to remove. >> '
132
137
  package = gets.chomp
133
138
  package.downcase
134
- case os
139
+ case oslin
135
140
  when 'ubuntu'
136
141
  uninstalldeb(package)
137
142
  when 'debian'
@@ -147,15 +152,19 @@ while exitis == 0 do
147
152
  when 'arch'
148
153
  uninstallpac(package)
149
154
  else
150
- print "\r"
151
- puts 'Sorry, I didn\'t recognize you\'re operating system.'
155
+ if osdar == 'darwin'
156
+ uninstallhb(package)
157
+ else
158
+ print "\r"
159
+ puts 'Sorry, I didn\'t recognize you\'re operating system.'
160
+ end
152
161
  end
153
162
  runOnce = true
154
163
  when 'search'
155
- print 'Please enter the package you\'d like to search for. >> '
164
+ print 'Please enter the name of the program you\'d like to search for. >> '
156
165
  package = gets.chomp
157
166
  package.downcase!
158
- case os
167
+ case oslin
159
168
  when 'ubuntu'
160
169
  searchdeb(package)
161
170
  when 'debian'
@@ -171,8 +180,12 @@ while exitis == 0 do
171
180
  when 'arch'
172
181
  searchpac(package)
173
182
  else
174
- print "\r"
175
- puts 'Sorry, I didn\'t recognize you\'re operating system.'
183
+ if osdar == 'darwin'
184
+ searchhb(package)
185
+ else
186
+ print "\r"
187
+ puts 'Sorry, I didn\'t recognize you\'re operating system.'
188
+ end
176
189
  end
177
190
  runOnce = true
178
191
  #File/folder manipulation
@@ -245,16 +258,27 @@ while exitis == 0 do
245
258
  =end
246
259
  when 'help'
247
260
  puts "\t install: install new programs or 'packages' on your system"
261
+ puts "\r"
248
262
  puts "\t uninstall: remove programs or 'packages' from your system"
263
+ puts "\r"
249
264
  puts "\t search: search for a program that can be installed with the aforementioned 'install' command"
265
+ puts "\r"
250
266
  puts "\t copy: copies a file or folder to another place"
267
+ puts "\r"
251
268
  puts "\t rename: renames a file on your computer"
269
+ puts "\r"
252
270
  puts "\t delete file: deletes a file on your compter"
271
+ puts "\r"
253
272
  puts "\t delete folder: deletes a folder on your computer (type yes at every promt)."
273
+ puts "\r"
254
274
  puts "\t create file: creates an empty text file on your computer (.rb, .py, .java, etc. count as text files)"
275
+ puts "\r"
255
276
  puts "\t change working folder: change the folder you\'ll be working in (e.g. Documents)"
277
+ puts "\r"
256
278
  puts "\t list files: list all of the files in a given folder (e.g. Downloads)"
257
- # puts "\t edit file: edits a text file in a bare-bones, quick editor (.rb, .html, .java, etc. count as text files)"
279
+ puts "\r"
280
+ # puts "\t edit file: edits a text file in a bare-bones, quick editor (.rb, .html, .java, etc. count as text files)"
281
+ # puts "\r"
258
282
  puts "\t exit: exits ezbash"
259
283
  puts "\r"
260
284
  when 'exit'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ezbash
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Logan Saunders
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-15 00:00:00.000000000 Z
11
+ date: 2015-02-17 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Users are thrown into a simplified shell with only a 'help' command as
14
14
  a guide.