hadoop-find 0.1.0-java → 0.1.1-java
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.
- data/CHANGELOG +1 -0
- data/bin/hfind.rb +11 -0
- metadata +2 -2
data/CHANGELOG
CHANGED
data/bin/hfind.rb
CHANGED
@@ -3,6 +3,8 @@
|
|
3
3
|
require 'java'
|
4
4
|
require 'getoptlong'
|
5
5
|
|
6
|
+
APP_VERSION = '0.1.1'
|
7
|
+
|
6
8
|
class HadoopFSFinder
|
7
9
|
def initialize uri, opts = {}
|
8
10
|
@opts = opts
|
@@ -227,6 +229,10 @@ class HadoopFSFinder
|
|
227
229
|
end
|
228
230
|
end
|
229
231
|
|
232
|
+
def version
|
233
|
+
puts APP_VERSION
|
234
|
+
end
|
235
|
+
|
230
236
|
def usage
|
231
237
|
puts <<-EOF
|
232
238
|
usage: hfind [options] path
|
@@ -243,6 +249,7 @@ usage: hfind [options] path
|
|
243
249
|
-h, --human # show human readable file sizes
|
244
250
|
-D, --no-hidden # do not show hidden files
|
245
251
|
-u, --uri # show full uri for path
|
252
|
+
-v, --version
|
246
253
|
-H, --help
|
247
254
|
EOF
|
248
255
|
end
|
@@ -265,6 +272,7 @@ gopts = GetoptLong.new(
|
|
265
272
|
[ '--under', '-U', GetoptLong::NO_ARGUMENT ],
|
266
273
|
[ '--human', '-h', GetoptLong::NO_ARGUMENT ],
|
267
274
|
[ '--no-hidden', '-D', GetoptLong::NO_ARGUMENT ],
|
275
|
+
[ '--version', '-v', GetoptLong::NO_ARGUMENT ],
|
268
276
|
[ '--help', '-H', GetoptLong::NO_ARGUMENT ],
|
269
277
|
)
|
270
278
|
|
@@ -296,6 +304,9 @@ gopts.each do |opt, arg|
|
|
296
304
|
opts[:uri] = true
|
297
305
|
when '--no-hidden'
|
298
306
|
opts[:no_hidden] = true
|
307
|
+
when '--version'
|
308
|
+
version
|
309
|
+
exit 0
|
299
310
|
else
|
300
311
|
usage
|
301
312
|
exit 1
|