This repository has been archived by the owner on Sep 8, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
chocolatey.lua
42 lines (42 loc) · 1.52 KB
/
chocolatey.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
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
local chocolatey_prerelease_flags = {"-pre", "-prerelease"}
local chocolatey_localonly_flags = {"-lo", "-localonly"}
local chocolatey_install_parser = clink.arg.new_parser()
chocolatey_install_parser:set_flags(
"-version",
chocolatey_prerelease_flags,
"-source" .. clink.arg.new_parser():set_arguments({"ruby", "webpi", "cygwin", "python"}),
"-o", "-override", "-overrideArgs", "-overrideArguments",
"-ia", "-installArgs", "-installArguments",
"-notSilent"
)
local chocolatey_update_parser = clink.arg.new_parser()
chocolatey_update_parser:set_flags(
chocolatey_prerelease_flags,
"-source"
)
chocolatey_update_parser:set_arguments({"all"})
local chocolatey_list_parser = clink.arg.new_parser()
chocolatey_list_parser:set_flags(
"-all", "-allversions",
chocolatey_prerelease_flags,
"-source" .. clink.arg.new_parser():set_arguments({"webpi", "windowsfeatures"})
)
local chocolatey_version_parser = clink.arg.new_parser()
chocolatey_version_parser:set_flags(
chocolatey_prerelease_flags,
chocolatey_localonly_flags,
"-source"
)
chocolatey_version_parser:set_arguments({"all"})
local chocolatey_parser = clink.arg.new_parser()
chocolatey_parser:set_arguments({
"install" .. chocolatey_install_parser,
"update" .. chocolatey_update_parser,
"uninstall" .. clink.arg.new_parser():set_flags("-version"),
"list" .. chocolatey_list_parser,
"search" .. chocolatey_list_parser,
"version" .. chocolatey_list_parser,
"help"
})
clink.arg.register_parser('chocolatey', chocolatey_parser)
clink.arg.register_parser('choco', chocolatey_parser)