7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
# File 'lib/backup-github/cli.rb', line 7
def self.parse_options
opts = Trollop::options do
banner "hola mundo"
opt :localrepo, "Path to the local repository where backups are saved",
:short => "-r",
:type => String,
:required => true
opt :organization, "Organization name if you want to backup repositories from one",
:short => "-o",
:type => String,
:required => false
opt :github_user, "Github User",
:short => "-u",
:type => String,
:required => true
opt :github_password, "Github Password",
:short => "-p",
:type => String,
:required => true
end
Trollop::die :localrepo, "must exist" unless File.directory? opts[:localrepo]
opts
end
|