2018-01-27 01:07:02 +08:00
|
|
|
|
@PowerShell -ExecutionPolicy Bypass -Command Invoke-Expression $('$args=@(^&{$args} %*);'+[String]::Join(';',(Get-Content '%~f0') -notmatch '^^@PowerShell.*EOF$')) & goto :EOF
|
|
|
|
|
|
|
|
|
|
echo " /###### /## /##/## "
|
|
|
|
|
echo " /##__ ## | ## | #|__/ "
|
|
|
|
|
echo " | ## \__/ /###### /###### /####### /######| ## | ##/##/######/#### "
|
|
|
|
|
echo " | ###### /##__ ##|____ ##/##_____//##__ #| ## / ##| #| ##_ ##_ ##"
|
|
|
|
|
echo " \____ #| ## \ ## /######| ## | ########\ ## ##/| #| ## \ ## \ ##"
|
|
|
|
|
echo " /## \ #| ## | ##/##__ #| ## | ##_____/ \ ###/ | #| ## | ## | ##"
|
|
|
|
|
echo " | ######| #######| ######| ######| ####### \ #/ | #| ## | ## | ##"
|
|
|
|
|
echo " \______/| ##____/ \_______/\_______/\_______/ \_/ |__|__/ |__/ |__/"
|
|
|
|
|
echo " | ## "
|
|
|
|
|
echo " | ## "
|
|
|
|
|
echo " |__/ "
|
2020-08-26 12:27:32 +08:00
|
|
|
|
echo " <20>汾: 1.6.0-dev <20><><EFBFBD>Ĺ<EFBFBD><C4B9><EFBFBD>: https://spacevim.org/cn/ "
|
2018-01-27 01:07:02 +08:00
|
|
|
|
|
|
|
|
|
Push-Location ~
|
|
|
|
|
|
|
|
|
|
$app_name = "SpaceVim"
|
|
|
|
|
$repo_url = "https://github.com/SpaceVim/SpaceVim.git"
|
|
|
|
|
$repo_name = "SpaceVim"
|
|
|
|
|
$repo_path = "$HOME\.SpaceVim"
|
|
|
|
|
|
2020-08-26 12:27:32 +08:00
|
|
|
|
Function Pause ($Message = "<EFBFBD>밴<EFBFBD><EFBFBD><EFBFBD>ⰴ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> . . . ") {
|
2018-01-28 10:01:14 +08:00
|
|
|
|
if ((Test-Path variable:psISE) -and $psISE) {
|
|
|
|
|
$Shell = New-Object -ComObject "WScript.Shell"
|
|
|
|
|
$Button = $Shell.Popup("Click OK to continue.", 0, "Script Paused", 0)
|
|
|
|
|
} else {
|
|
|
|
|
Write-Host -NoNewline $Message
|
|
|
|
|
[void][System.Console]::ReadKey($true)
|
|
|
|
|
Write-Host
|
|
|
|
|
}
|
2018-01-27 01:07:02 +08:00
|
|
|
|
}
|
|
|
|
|
|
2020-08-26 12:27:32 +08:00
|
|
|
|
echo "==> <20><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><E2BBB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>..."
|
2018-01-27 01:07:02 +08:00
|
|
|
|
echo ""
|
|
|
|
|
sleep 1
|
|
|
|
|
|
|
|
|
|
|
2020-08-26 12:27:32 +08:00
|
|
|
|
echo "==> <20><><EFBFBD><EFBFBD> git <20><><EFBFBD><EFBFBD>"
|
2018-01-27 01:07:02 +08:00
|
|
|
|
if (Get-Command "git" -ErrorAction SilentlyContinue) {
|
2018-01-28 10:01:14 +08:00
|
|
|
|
git version
|
2020-08-26 12:27:32 +08:00
|
|
|
|
echo "[OK] <20><><EFBFBD>Գɹ<D4B3>. <20><>ʼ<EFBFBD><CABC>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>..."
|
2018-02-02 20:08:36 +08:00
|
|
|
|
sleep 1
|
2018-01-27 01:07:02 +08:00
|
|
|
|
} else {
|
2018-01-28 10:01:14 +08:00
|
|
|
|
echo ""
|
2020-08-26 12:27:32 +08:00
|
|
|
|
echo "[ERROR] <20><EFBFBD><DEB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> PATH <20>з<EFBFBD><D0B7><EFBFBD> 'git.exe' <20><><EFBFBD><EFBFBD>"
|
|
|
|
|
echo ">>> <><D7BC><EFBFBD>˳<EFBFBD>......"
|
2018-02-02 20:08:36 +08:00
|
|
|
|
Pause
|
|
|
|
|
exit
|
2018-01-27 01:07:02 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
echo ""
|
|
|
|
|
|
2020-08-26 12:27:32 +08:00
|
|
|
|
echo "==> <20><><EFBFBD><EFBFBD> vim <20><><EFBFBD><EFBFBD>"
|
|
|
|
|
if (Get-Command "vim" -ErrorAction SilentlyContinue) {
|
2018-01-28 10:01:14 +08:00
|
|
|
|
echo ($(vim --version) -split '\n')[0]
|
2020-08-26 12:27:32 +08:00
|
|
|
|
echo "[OK] <20><><EFBFBD>Գɹ<D4B3>. <20><>ʼ<EFBFBD><CABC>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>..."
|
2018-02-02 20:08:36 +08:00
|
|
|
|
sleep 1
|
2018-01-27 01:07:02 +08:00
|
|
|
|
} else {
|
2020-08-26 12:27:32 +08:00
|
|
|
|
echo "[WARNING] <20><EFBFBD><DEB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> PATH <20>з<EFBFBD><D0B7><EFBFBD> 'vim' <20><><EFBFBD><EFBFBD>. <20><><EFBFBD>Կɼ<D4BF><C9BC><EFBFBD><EFBFBD><EFBFBD>װ..."
|
2018-02-02 20:08:36 +08:00
|
|
|
|
echo ""
|
2020-08-26 12:27:32 +08:00
|
|
|
|
echo "[WARNING] <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>װ vim <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȷ<EFBFBD><C8B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> PATH! "
|
2018-02-02 20:08:36 +08:00
|
|
|
|
Pause
|
2018-01-27 01:07:02 +08:00
|
|
|
|
}
|
|
|
|
|
|
2020-08-26 12:27:32 +08:00
|
|
|
|
echo "==> <20><><EFBFBD><EFBFBD> nvim <20><><EFBFBD><EFBFBD>"
|
|
|
|
|
if (Get-Command "nvim" -ErrorAction SilentlyContinue) {
|
|
|
|
|
echo ($(nvim --version) -split '\n')[0]
|
|
|
|
|
echo "[OK] <20><><EFBFBD>Գɹ<D4B3>. <20><>ʼ<EFBFBD><CABC>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>..."
|
|
|
|
|
sleep 1
|
|
|
|
|
} else {
|
|
|
|
|
echo "[WARNING] <20><EFBFBD><DEB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> PATH <20>з<EFBFBD><D0B7><EFBFBD> 'nvim' <20><><EFBFBD><EFBFBD>. <20><><EFBFBD>Կɼ<D4BF><C9BC><EFBFBD><EFBFBD><EFBFBD>װ..."
|
|
|
|
|
echo ""
|
|
|
|
|
echo "[WARNING] <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>װ Neovim <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȷ<EFBFBD><C8B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> PATH! "
|
|
|
|
|
Pause
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
echo "<== <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>..."
|
2018-01-27 01:07:02 +08:00
|
|
|
|
sleep 1
|
|
|
|
|
echo ""
|
|
|
|
|
echo ""
|
|
|
|
|
|
|
|
|
|
if (!(Test-Path "$HOME\.SpaceVim")) {
|
2020-08-26 12:27:32 +08:00
|
|
|
|
echo "==> <20><><EFBFBD>ڰ<EFBFBD>װ $app_name"
|
2018-02-02 20:08:36 +08:00
|
|
|
|
git clone $repo_url $repo_path
|
2018-01-27 01:07:02 +08:00
|
|
|
|
} else {
|
2020-08-26 12:27:32 +08:00
|
|
|
|
echo "==> <20><><EFBFBD>ڸ<EFBFBD><DAB8><EFBFBD> $app_name"
|
2018-02-02 20:08:36 +08:00
|
|
|
|
Push-Location $repo_path
|
|
|
|
|
git pull origin master
|
2018-01-27 01:07:02 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
echo ""
|
|
|
|
|
if (!(Test-Path "$HOME\vimfiles")) {
|
2018-01-28 10:01:14 +08:00
|
|
|
|
cmd /c mklink $HOME\vimfiles $repo_path
|
2020-08-26 12:27:32 +08:00
|
|
|
|
echo "[OK] <20><>Ϊ vim <20><>װ SpaceVim"
|
2018-02-02 20:08:36 +08:00
|
|
|
|
sleep 1
|
2018-01-28 10:01:14 +08:00
|
|
|
|
} else {
|
2020-08-26 12:27:32 +08:00
|
|
|
|
echo "[OK] $HOME\vimfiles <20>Ѵ<EFBFBD><D1B4><EFBFBD>"
|
2018-02-02 20:08:36 +08:00
|
|
|
|
sleep 1
|
2018-01-28 10:01:14 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
echo ""
|
|
|
|
|
if (!(Test-Path "$HOME\AppData\Local\nvim")) {
|
2018-09-25 22:17:36 +08:00
|
|
|
|
cmd /c mklink "$HOME\AppData\Local\nvim" $repo_path
|
2020-08-26 12:27:32 +08:00
|
|
|
|
echo "[OK] <20><>Ϊ neovim <20><>װ SpaceVim"
|
2018-02-02 20:08:36 +08:00
|
|
|
|
sleep 1
|
2018-01-27 01:07:02 +08:00
|
|
|
|
} else {
|
2020-08-26 12:27:32 +08:00
|
|
|
|
echo "[OK] $HOME\AppData\Local\nvim <20>Ѵ<EFBFBD><D1B4><EFBFBD>"
|
2018-02-02 20:08:36 +08:00
|
|
|
|
sleep 1
|
2018-01-27 01:07:02 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
echo ""
|
2020-08-26 12:27:32 +08:00
|
|
|
|
echo "<EFBFBD><EFBFBD>װ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>!"
|
2018-01-27 01:07:02 +08:00
|
|
|
|
echo "=============================================================================="
|
2020-08-26 12:27:32 +08:00
|
|
|
|
echo "== <20><><EFBFBD><EFBFBD> Vim <20><> Neovim<69><6D><EFBFBD><EFBFBD><EFBFBD>в<EFBFBD><D0B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Զ<EFBFBD><D4B6><EFBFBD>װ =="
|
2018-01-27 01:07:02 +08:00
|
|
|
|
echo "=============================================================================="
|
|
|
|
|
echo ""
|
2020-08-26 12:27:32 +08:00
|
|
|
|
echo "<EFBFBD><EFBFBD>л֧<EFBFBD><EFBFBD> SpaceVim<69><6D><EFBFBD><EFBFBD>ӭ<EFBFBD><D3AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
2018-01-27 01:07:02 +08:00
|
|
|
|
echo ""
|
|
|
|
|
|
|
|
|
|
Pause
|
2018-01-27 16:38:19 +08:00
|
|
|
|
|
2019-07-23 21:24:13 +08:00
|
|
|
|
# vim:set ft=powershell nowrap:
|