-
Notifications
You must be signed in to change notification settings - Fork 1
/
install.ps1
62 lines (58 loc) · 2.94 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
60
61
62
param(
[string]$prefix,
[string]$nvimexe
)
if ($prefix -eq "" -or $nvimexe -eq "") {
Write-Host "You have to set the prefix and the nvimexe via -nvimexe and -prefix parameters. "
Write-Host "Example: install.ps1 -prefix c:/Users/johndoe/azul -nvimexe c:/Users/johndoe/nvim-qt/nvim-qt.exe"
}
else {
if (Test-Path "$prefix\azul.cmd") {
Remove-Item "$prefix\azul.cmd"
}
echo "set AZUL_PREFIX=$prefix" | Out-File -FilePath "$prefix\azul.cmd" -Encoding ASCII
echo "set AZUL_NVIM_EXE=$nvimexe" | Out-File -FilePath "$prefix\azul.cmd" -Append -Encoding ASCII
echo "set HOME=%AZUL_PREFIX%" | Out-File -FilePath "$prefix\azul.cmd" -Append -Encoding ASCII
echo "set XDG_CONFIG_HOME=%AZUL_PREFIX%\share\azul" | Out-File -FilePath "$prefix\azul.cmd" -Append -Encoding ASCII
echo "set XDG_DATA_HOME=%AZUL_PREFIX%\share\azul" | Out-File -FilePath "$prefix\azul.cmd" -Append -Encoding ASCII
echo "" | Out-File -FilePath "$prefix\azul.cmd" -Append -Encoding ASCII
echo "%AZUL_NVIM_EXE%" | Out-File -FilePath "$prefix\azul.cmd" -Append -Encoding ASCII
if (-not (Test-Path "$prefix\share")) {
mkdir $prefix\share
mkdir $prefix\share\azul
mkdir $prefix\share\azul\nvim
}
if (-not (Test-Path "$prefix\.config")) {
mkdir $prefix\.config
mkdir $prefix\.config\azul
mkdir $prefix\.config\azul\lua
mkdir $prefix\.config\azul\pack
mkdir $prefix\.config\azul\pack\start
mkdir $prefix\.config\azul\pack\opt
}
xcopy .\nvim $prefix\share\azul\nvim /e /s /h
if (-not (Test-Path "$prefix\.config\azul")) {
copy .\examples\lua\*.* $prefix\.config\azul\lua\
copy .\examples\azul.init $prefix\.config\azul\config.ini
}
if (-not (Test-Path "$prefix\.config\azul\pack\start\lualine.nvim")) {
git clone https://github.com/nvim-lualine/lualine.nvim $prefix\.config\azul\pack\start\lualine.nvim
cd $prefix\.config\azul\pack\start\lualine.nvim
git checkout b431d228b7bbcdaea818bdc3e25b8cdbe861f056
}
if (-not (Test-Path "$prefix\.config\azul\pack\start\which-key.nvim")) {
git clone https://github.com/folke/which-key.nvim $prefix\.config\azul\pack\start\which-key.nvim
cd $prefix\.config\azul\pack\start\which-key.nvim
git checkout 6c1584eb76b55629702716995cca4ae2798a9cca
}
if (-not (Test-Path "$prefix\.config\azul\pack\start\plenary.nvim")) {
git clone https://github.com/nvim-lua/plenary.nvim $prefix\.config\azul\pack\start\plenary.nvim
cd $prefix\.config\azul\pack\start\plenary.nvim
git checkout 2d9b06177a975543726ce5c73fca176cedbffe9d
}
if (-not (Test-Path "$prefix\.config\azul\pack\start\telescope.nvim")) {
git clone https://github.com/nvim-telescope/telescope.nvim $prefix\.config\azul\pack\start\telescope.nvim
cd $prefix\.config\azul\pack\start\telescope.nvim
git checkout eae0d8fbde590b0eaa2f9481948cd6fd7dd21656
}
}