update update.sh
This commit is contained in:
parent
6aa11722e3
commit
223ed61876
29
update.sh
29
update.sh
@ -6,6 +6,17 @@ function get_platform_type()
|
|||||||
echo $(uname)
|
echo $(uname)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# 判断文件是否存在
|
||||||
|
function is_exist_file()
|
||||||
|
{
|
||||||
|
filename=$1
|
||||||
|
if [ -f $filename ]; then
|
||||||
|
echo 1
|
||||||
|
else
|
||||||
|
echo 0
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
# 更新mac平台字体
|
# 更新mac平台字体
|
||||||
function update_fonts_on_mac()
|
function update_fonts_on_mac()
|
||||||
{
|
{
|
||||||
@ -29,6 +40,22 @@ function update_vim_plugin()
|
|||||||
vim -c "PlugUpdate" -c "q" -c "q"
|
vim -c "PlugUpdate" -c "q" -c "q"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# 拷贝文件
|
||||||
|
function copy_files()
|
||||||
|
{
|
||||||
|
vimrc_plugins=$HOME"/.vimrc.plugins"
|
||||||
|
is_exist=$(is_exist_file $vimrc_plugins)
|
||||||
|
if [ $is_exist != 1 ]; then
|
||||||
|
cp ${PWD}/.vimrc.plugins ~
|
||||||
|
fi
|
||||||
|
|
||||||
|
vimrc_config=$HOME"/.vimrc.config"
|
||||||
|
is_exist=$(is_exist_file $vimrc_config)
|
||||||
|
if [ $is_exist != 1 ]; then
|
||||||
|
cp ${PWD}/.vimrc.config ~
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
# 打印logo
|
# 打印logo
|
||||||
function print_logo()
|
function print_logo()
|
||||||
{
|
{
|
||||||
@ -53,6 +80,7 @@ function print_logo()
|
|||||||
function update_vimplus_on_mac()
|
function update_vimplus_on_mac()
|
||||||
{
|
{
|
||||||
git pull origin master
|
git pull origin master
|
||||||
|
copy_files
|
||||||
update_fonts_on_mac
|
update_fonts_on_mac
|
||||||
update_vim_plugin
|
update_vim_plugin
|
||||||
print_logo
|
print_logo
|
||||||
@ -62,6 +90,7 @@ function update_vimplus_on_mac()
|
|||||||
function update_vimplus_on_linux()
|
function update_vimplus_on_linux()
|
||||||
{
|
{
|
||||||
git pull origin master
|
git pull origin master
|
||||||
|
copy_files
|
||||||
update_fonts_on_linux
|
update_fonts_on_linux
|
||||||
update_vim_plugin
|
update_vim_plugin
|
||||||
print_logo
|
print_logo
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user