From 03e9a7c56b7da283b8dadfdbf906d65d068b545e Mon Sep 17 00:00:00 2001 From: chxuan <787280310@qq.com> Date: Sun, 23 Feb 2020 14:24:24 +0800 Subject: [PATCH] update update.sh --- update.sh | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/update.sh b/update.sh index bcae576..b9d42ef 100755 --- a/update.sh +++ b/update.sh @@ -1,11 +1,5 @@ #!/bin/bash -# 获取平台类型,mac还是linux平台 -function get_platform_type() -{ - echo $(uname) -} - # 判断文件是否存在 function is_exist_file() { @@ -111,6 +105,16 @@ function update_vimplus_on_linux() print_logo } +# 在android更新vimplus +function update_vimplus_on_android() +{ + git pull origin master + copy_files + update_fonts_on_linux + update_vim_plugin + print_logo +} + # 获取当前时间戳 function get_now_timestamp() { @@ -123,13 +127,19 @@ function main() { begin=`get_now_timestamp` - type=`get_platform_type` + type=$(uname) echo "Platform type: "${type} if [ ${type} == "Darwin" ]; then update_vimplus_on_mac elif [ ${type} == "Linux" ]; then - update_vimplus_on_linux + tp=$(uname -a) + if [[ $tp =~ "Android" ]]; then + echo "Android" + update_vimplus_on_android + else + update_vimplus_on_linux + fi else echo "Not support platform type: "${type} fi