-
Notifications
You must be signed in to change notification settings - Fork 1
/
WindowsEnvSetup.ps1
53 lines (47 loc) · 1.15 KB
/
WindowsEnvSetup.ps1
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
43
44
45
46
47
48
49
50
51
52
53
[CmdletBinding()]
param()
function ScoopInstallIfUnavailable($module_name) {
if (Get-Command $module_name -ea SilentlyContinue) {
return
}
scoop install $module_name
}
function IsScoopBucketAvailable($bucket_name) {
$scoop_bucket_list_result=scoop bucket list
foreach ($line in $scoop_bucket_list_result) {
if ($line -match "^" + $bucket_name + "$") {
return $TRUE
}
}
return $FALSE
}
function ScoopAddBucketIfUnavailable($bucket_name) {
if (!(IsScoopBucketAvailable $bucket_name)) {
scoop bucket add $bucket_name
}
}
# Add buckets if not available.
$add_bucket_array = @('extras', 'java', 'nonportable')
foreach ($bucket in $add_bucket_array) {
ScoopAddBucketIfUnavailable $bucket
}
# Install each modules.
$install_module_array = @('cppcheck',
'curl',
'dark',
'doxygen'
'emacs',
'google-japanese-input-np',
'graphviz',
'innounp',
'mobaxterm',
'openjdk',
'plantuml',
'python',
'sysinternals')
foreach ($command_to_install in $install_module_array) {
ScoopInstallIfUnavailable $command_to_install
}
# Post install processes.
scoop cleanup "*"
scoop checkup