1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-24 09:40:06 +08:00
SpaceVim/docs/cn/install.cmd

112 lines
3.4 KiB
Batchfile
Raw Normal View History

@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 " |__/ "
2019-04-09 21:30:48 +08:00
echo " <20>汾 : 1.2.0-dev <20><><EFBFBD>Ĺ<EFBFBD><C4B9><EFBFBD> : https://spacevim.org/cn/ "
Push-Location ~
$app_name = "SpaceVim"
$repo_url = "https://github.com/SpaceVim/SpaceVim.git"
$repo_name = "SpaceVim"
$repo_path = "$HOME\.SpaceVim"
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
}
}
echo "==> <20><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><E2BBB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>..."
echo ""
sleep 1
echo "==> <20><><EFBFBD><EFBFBD> git <20><><EFBFBD><EFBFBD>"
if (Get-Command "git" -ErrorAction SilentlyContinue) {
2018-01-28 10:01:14 +08:00
git version
echo "[OK] <20><><EFBFBD>Գɹ<D4B3>. <20><>ʼ<EFBFBD><CABC>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>..."
2018-02-02 20:08:36 +08:00
sleep 1
} else {
2018-01-28 10:01:14 +08:00
echo ""
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
}
echo ""
echo "==> <20><><EFBFBD><EFBFBD> gvim <20><><EFBFBD><EFBFBD>"
if (Get-Command "gvim" -ErrorAction SilentlyContinue) {
2018-01-28 10:01:14 +08:00
echo ($(vim --version) -split '\n')[0]
echo "[OK] <20><><EFBFBD>Գɹ<D4B3>. <20><>ʼ<EFBFBD><CABC>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>..."
2018-02-02 20:08:36 +08:00
sleep 1
} else {
echo "[WARNING] <20>޷<EFBFBD><DEB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> PATH <20>з<EFBFBD><D0B7><EFBFBD> 'gvim.exe' <20><><EFBFBD><EFBFBD>. <20><><EFBFBD>Կɼ<D4BF><C9BC><EFBFBD><EFBFBD><EFBFBD>װ..."
2018-02-02 20:08:36 +08:00
echo ""
echo "[WARNING] <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>װ gvim <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȷ<EFBFBD><C8B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> PATH! "
2018-02-02 20:08:36 +08:00
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>..."
sleep 1
echo ""
echo ""
if (!(Test-Path "$HOME\.SpaceVim")) {
echo "==> <20><><EFBFBD>ڰ<EFBFBD>װ $app_name"
2018-02-02 20:08:36 +08:00
git clone $repo_url $repo_path
} else {
echo "==> <20><><EFBFBD>ڸ<EFBFBD><DAB8><EFBFBD> $app_name"
2018-02-02 20:08:36 +08:00
Push-Location $repo_path
git pull origin master
}
echo ""
if (!(Test-Path "$HOME\vimfiles")) {
2018-01-28 10:01:14 +08:00
cmd /c mklink $HOME\vimfiles $repo_path
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 {
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")) {
cmd /c mklink "$HOME\AppData\Local\nvim" $repo_path
echo "[OK] <20><>Ϊ neovim <20><>װ SpaceVim"
2018-02-02 20:08:36 +08:00
sleep 1
} else {
echo "[OK] $HOME\AppData\Local\nvim <20>Ѵ<EFBFBD><D1B4><EFBFBD>"
2018-02-02 20:08:36 +08:00
sleep 1
}
echo ""
echo "<EFBFBD><EFBFBD>װ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>!"
echo "=============================================================================="
echo "== <20><><EFBFBD><EFBFBD> Vim <20><> Neovim<69><6D><EFBFBD><EFBFBD><EFBFBD>в<EFBFBD><D0B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Զ<EFBFBD><D4B6><EFBFBD>װ =="
echo "=============================================================================="
echo ""
echo "<EFBFBD><EFBFBD>л֧<EFBFBD><EFBFBD> SpaceVim<69><6D><EFBFBD><EFBFBD>ӭ<EFBFBD><D3AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
echo ""
Pause
2018-01-27 16:38:19 +08:00
2018-01-28 10:01:14 +08:00
# vim:set ft=ps1 nowrap: