1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-03-13 02:05:40 +08:00
This commit is contained in:
Wang Shidong 2019-07-23 21:24:13 +08:00 committed by GitHub
parent 8ecee385e9
commit 360c73b74d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 44 additions and 30 deletions

View File

@ -26,9 +26,23 @@ elif [ "$LINT" = "file-encoding" ]; then
for file in $(git diff --name-only HEAD master | grep .);
do
encoding=`file -bi $file | cut -f 2 -d";" | cut -f 2 -d=`
if [ ! $encoding = 'utf-8' ]; then
echo $file >> encoding_log
fi
case $encoding in
utf-8)
exit 0
;;
us-ascii)
exit 0
;;
cp936)
echo $file >> encoding_log
exit 2
;;
cp835)
echo $file >> encoding_log
exit 2
esac
echo $file >> encoding_log
exit 2
done
if [[ -s encoding_log ]]; then
cat encoding_log

View File

@ -11,7 +11,7 @@
[![Build Status](https://travis-ci.org/SpaceVim/SpaceVim.svg?branch=master)](https://travis-ci.org/SpaceVim/SpaceVim)
[![Build status](https://ci.appveyor.com/api/projects/status/eh3t5oph70abp665/branch/master?svg=true)](https://ci.appveyor.com/project/wsdjeg/spacevim/branch/master)
[![codecov](https://codecov.io/gh/SpaceVim/SpaceVim/branch/master/graph/badge.svg)](https://codecov.io/gh/SpaceVim/SpaceVim/branch/master)
![Version](https://img.shields.io/badge/version-1.2.0-8700FF.svg)
![Version](https://img.shields.io/badge/version-1.3.0--dev-8700FF.svg)
[![GPLv3 License](https://img.shields.io/badge/license-GPLv3-blue.svg)](LICENSE)
[![Doc](https://img.shields.io/badge/doc-%3Ah%20SpaceVim-orange.svg)](doc/SpaceVim.txt)

View File

@ -43,7 +43,7 @@ scriptencoding utf-8
""
" Version of SpaceVim , this value can not be changed.
let g:spacevim_version = '1.2.0'
let g:spacevim_version = '1.3.0-dev'
lockvar g:spacevim_version
""

View File

@ -11,7 +11,7 @@ echo " \______/| ##____/ \_______/\_______/\_______/ \_/ |__|__/ |__/
echo " | ## "
echo " | ## "
echo " |__/ "
echo " 版本 : 1.2.0 中文官网 : https://spacevim.org/cn/ "
echo " 版本 : 1.2.0 中文官网 : https://spacevim.org/cn/ "
Push-Location ~
@ -20,7 +20,7 @@ $repo_url = "https://github.com/SpaceVim/SpaceVim.git"
$repo_name = "SpaceVim"
$repo_path = "$HOME\.SpaceVim"
Function Pause ($Message = "请按任意按键继续 . . . ") {
Function Pause ($Message = "请按任意按键继续 . . . ") {
if ((Test-Path variable:psISE) -and $psISE) {
$Shell = New-Object -ComObject "WScript.Shell"
$Button = $Shell.Popup("Click OK to continue.", 0, "Script Paused", 0)
@ -31,48 +31,48 @@ Function Pause ($Message = "
}
}
echo "==> 开始检测环境依赖..."
echo "==> 开始检测环境依赖..."
echo ""
sleep 1
echo "==> 测试 git 命令"
echo "==> 测试 git 命令"
if (Get-Command "git" -ErrorAction SilentlyContinue) {
git version
echo "[OK] 测试成功. 开始下一个测试..."
echo "[OK] 测试成功. 开始下一个测试..."
sleep 1
} else {
echo ""
echo "[ERROR] 无法在你的 PATH 中发现 'git.exe' 命令"
echo ">>> 准备退出......"
echo "[ERROR] 无法在你的 PATH 中发现 'git.exe' 命令"
echo ">>> 准备退出......"
Pause
exit
}
echo ""
echo "==> 测试 gvim 命令"
echo "==> 测试 gvim 命令"
if (Get-Command "gvim" -ErrorAction SilentlyContinue) {
echo ($(vim --version) -split '\n')[0]
echo "[OK] 测试成功. 开始下一个测试..."
echo "[OK] 测试成功. 开始下一个测试..."
sleep 1
} else {
echo "[WARNING] 无法在你的 PATH 中发现 'gvim.exe' 命令. 但仍可继续安装..."
echo "[WARNING] 无法在你的 PATH 中发现 'gvim.exe' 命令. 但仍可继续安装..."
echo ""
echo "[WARNING] 请后续安装 gvim 或者正确设置你的 PATH! "
echo "[WARNING] 请后续安装 gvim 或者正确设置你的 PATH! "
Pause
}
echo "<== 环境依赖检测已完成. 继续下一步..."
echo "<== 环境依赖检测已完成. 继续下一步..."
sleep 1
echo ""
echo ""
if (!(Test-Path "$HOME\.SpaceVim")) {
echo "==> 正在安装 $app_name"
echo "==> 正在安装 $app_name"
git clone $repo_url $repo_path
} else {
echo "==> 正在更新 $app_name"
echo "==> 正在更新 $app_name"
Push-Location $repo_path
git pull origin master
}
@ -80,32 +80,32 @@ if (!(Test-Path "$HOME\.SpaceVim")) {
echo ""
if (!(Test-Path "$HOME\vimfiles")) {
cmd /c mklink $HOME\vimfiles $repo_path
echo "[OK] 已为 vim 安装 SpaceVim"
echo "[OK] 已为 vim 安装 SpaceVim"
sleep 1
} else {
echo "[OK] $HOME\vimfiles 已存在"
echo "[OK] $HOME\vimfiles 已存在"
sleep 1
}
echo ""
if (!(Test-Path "$HOME\AppData\Local\nvim")) {
cmd /c mklink "$HOME\AppData\Local\nvim" $repo_path
echo "[OK] 已为 neovim 安装 SpaceVim"
echo "[OK] 已为 neovim 安装 SpaceVim"
sleep 1
} else {
echo "[OK] $HOME\AppData\Local\nvim 已存在"
echo "[OK] $HOME\AppData\Local\nvim 已存在"
sleep 1
}
echo ""
echo "安装已完成!"
echo "安装已完成!"
echo "=============================================================================="
echo "== 打开 Vim 或 Neovim所有插件将会自动安装 =="
echo "== 打开 Vim 或 Neovim所有插件将会自动安装 =="
echo "=============================================================================="
echo ""
echo "感谢支持 SpaceVim欢迎反馈"
echo "感谢支持 SpaceVim欢迎反馈"
echo ""
Pause
# vim:set ft=ps1 nowrap:
# vim:set ft=powershell nowrap:

View File

@ -11,7 +11,7 @@ echo " \______/| ##____/ \_______/\_______/\_______/ \_/ |__|__/ |__/
echo " | ## "
echo " | ## "
echo " |__/ "
echo " version : 1.2.0 by : spacevim.org "
echo " version : 1.3.0-dev by : spacevim.org "
Push-Location ~
@ -105,4 +105,4 @@ echo ""
Pause
# vim:set ft=ps1:
# vim:set ft=powershell nowrap:

View File

@ -84,7 +84,7 @@ On_IWhite='\033[0;107m' # White
# }}}
# version
Version='1.2.0'
Version='1.3.0-dev'
#System name
System="$(uname -s)"