-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathInstall-Module.ps1
136 lines (127 loc) · 6.78 KB
/
Install-Module.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
#requires -version 2.0
###############################################################################
# Wintellect NuGet Macros Module
#
# Installs the WintellectVSCmdlets module into the NuGet module store.
#
# Copyright (c) 2002 - 2012 - John Robbins/Wintellect
#
# Do whatever you want with this module, but please do give credit.
###############################################################################
# Always make sure all variables are defined and all best practices are
# followed.
Set-StrictMode -version Latest
# Make sure we are running in the NuGet Package Manager Console.
if ($host.Name -ne "Package Manager Host")
{
Write-Warning "This installation script can only be run from inside the NuGet Package Manager Console."
return
}
# Check if the proper files exist.
$files = ".\about_WintellectVSCmdlets.help.txt",".\WintellectVSCmdlets.psd1",".\WintellectVSCmdlets.psm1"
foreach ($file in $files)
{
if ((Test-Path $file) -eq $false)
{
$err = "{0} is missing" -f $file
Write-Warning $err
return
}
}
$modPath = ($ENV:PSModulePath -split ';')[0]
$fullPath = $modPath + "\WintellectVSCmdlets"
if (! (Test-Path $fullPath) )
{
New-Item -type directory -Path $fullPath > $null
}
# We are good to go!
Copy-Item $files -Destination $fullPath
"The WintellectVSCmdlets module is ready for use."
""
"Execute 'Import-Module WintellectVSCmdlets' to load."
""
"Consider adding to $profile to ensure the cmdlets are always available."
""
"Learn about the commands with 'help WintellectVSCmdlets' after loading."
# SIG # Begin signature block
# MIIO0QYJKoZIhvcNAQcCoIIOwjCCDr4CAQExCzAJBgUrDgMCGgUAMGkGCis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