-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.ps1
executable file
·59 lines (45 loc) · 1.71 KB
/
install.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
$url = "https://download.sysinternals.com/files/Junction.zip"
$output = "$PSScriptRoot\vim\bin\junctions.zip"
$start_time = Get-Date
"Download Junctions"
$wc = New-Object System.Net.WebClient
$wc.DownloadFile($url, $output)
#OR
(New-Object System.Net.WebClient).DownloadFile($url, $output)
Write-Output "Time taken: $((Get-Date).Subtract($start_time).Seconds) second(s)"
"Unzip Junctions"
$shell = new-object -com shell.application
$zip = $shell.NameSpace($output)
foreach($item in $zip.items())
{
$shell.Namespace("$PSSCriptRoot\vim\bin").copyhere($item)
}
$url = "http://prdownloads.sourceforge.net/ctags/ctags58.zip"
$output = "$PSScriptRoot\vim\bin\ctags58.zip"
$start_time = Get-Date
"Download ctags"
$wc = New-Object System.Net.WebClient
$wc.DownloadFile($url, $output)
#OR
(New-Object System.Net.WebClient).DownloadFile($url, $output)
Write-Output "Time taken: $((Get-Date).Subtract($start_time).Seconds) second(s)"
"Unzip Ctags"
$shell = new-object -com shell.application
$zip = $shell.NameSpace($output)
foreach($item in $zip.items())
{
$shell.Namespace("$PSSCriptRoot\vim\bin").copyhere($item)
}
Move-Item $PSSCriptRoot\vim\bin\ctags58\ctags.exe $PSSCriptRoot\vim\bin\
"Download ag"
$url = "https://kjkpub.s3.amazonaws.com/software/the_silver_searcher/rel/0.29.1-1641/ag.exe"
$output = "$PSScriptRoot\vim\bin\ag.exe"
$start_time = Get-Date
$wc = New-Object System.Net.WebClient
$wc.DownloadFile($url, $output)
#OR
(New-Object System.Net.WebClient).DownloadFile($url, $output)
Write-Output "Time taken: $((Get-Date).Subtract($start_time).Seconds) second(s)"
"Link Paths"
invoke-expression "mklink /H $env:userprofile\_vimrc $PSScriptRoot\vimrc"
invoke-expression "cmd /c $PSScriptRoot\vim\bin\junction %userprofile%\_vim %cd%\vim"