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
|
# File 'lib/smdev.rb', line 14
def run(args = ARGV)
options = parse_options
command = args.shift || 'help'
subcommand = args.shift
case command
when 'local_app_setup'
execute_local_app_setup
when 'system_install'
system_install
when 'clone_repos'
clone_repos(options)
when 'update_repos'
update_repos(options)
when 'console'
execute_console(options)
when 'ssh'
execute_ssh(options)
when 'pr_critic'
handle_pr_critic(options)
when 'update'
handle_update_command(subcommand)
when 'help'
display_help
else
puts "Unknown command: #{command}"
display_help
end
end
|