Rev 33 | Rev 43 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 33 | Rev 37 | ||
|---|---|---|---|
| Line 18... | Line 18... | ||
| 18 | # ============================================================================= |
18 | # ============================================================================= |
| 19 | # Functions |
19 | # Functions |
| 20 | # ============================================================================= |
20 | # ============================================================================= |
| 21 | 21 | ||
| 22 | def Usage(progname, mesg) |
22 | def Usage(progname, mesg) |
| 23 | puts "Usage : #{progname} directory" |
23 | puts "Usage: #{progname} directory" |
| 24 | puts mesg |
24 | puts mesg |
| 25 | end |
25 | end |
| 26 | 26 | ||
| 27 | # |
27 | # |
| 28 | # dir is directory to traverse |
28 | # dir is directory to traverse |
| Line 62... | Line 62... | ||
| 62 | if (ARGV.length == 1) |
62 | if (ARGV.length == 1) |
| 63 | directory = ARGV[0] |
63 | directory = ARGV[0] |
| 64 | if File.directory?(directory) |
64 | if File.directory?(directory) |
| 65 | start_traverse(directory) |
65 | start_traverse(directory) |
| 66 | else |
66 | else |
| 67 | Usage progname, "ERROR: No directory #{directory} found" |
67 | Usage progname, "ERROR: Not a directory #{directory}" |
| 68 | end |
68 | end |
| 69 | else |
69 | else |
| 70 | Usage progname, "ERROR: 1 argument expected" |
70 | Usage progname, "ERROR: 1 argument expected" |
| 71 | end |
71 | end |