代码拉取完成,页面将自动刷新
同步操作将从 拓深科技/thingsvue 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#!/bin/bash
# 函数
function echoMsg(){
echo -e ${1}
}
git add .
#是否是主分支
read -p "是否是主分支[y/n]" branch
if [ "$branch" == "y" ]
then
# 选择提交类型
read -p "提交类型 [a/u/f/s]:" comfirm
#新增
if [ "$comfirm" == "a" ]
then
read -p "输入commit信息:" gitCommit
git commit -m "ADD | #$gitCommit"
#更新
elif [ "$comfirm" == "u" ]
then
read -p "输入commit信息:" gitCommit
git commit -m "UPDATE | #$gitCommit"
#修复
elif [ "$comfirm" == "f" ]
then
read -p "输入commit信息:" gitCommit
git commit -m "FIX | #$gitCommit"
else [ "$comfirm" == "s" ]
read -p "输入commit信息:" gitCommit
git commit -m "SELF | #$gitCommit"
fi
echoMsg "\n\n*************** 正在提交代码... ***************\n\n"
git push origin master
else
read -p "请输入分支名称:" branchName
# 选择提交类型
read -p "提交类型 [a/u/f/s]:" comfirm
#新增
if [ "$comfirm" == "a" ]
then
read -p "输入commit信息:" gitCommit
git commit -m "ADD | #$gitCommit"
#更新
elif [ "$comfirm" == "u" ]
then
read -p "输入commit信息:" gitCommit
git commit -m "UPDATE | #$gitCommit"
#修复
elif [ "$comfirm" == "f" ]
then
read -p "输入commit信息:" gitCommit
git commit -m "FIX | #$gitCommit"
else [ "$comfirm" == "s" ]
read -p "输入commit信息:" gitCommit
git commit -m "SELF | #$gitCommit"
fi
echoMsg "\n\n*************** 正在提交代码... ***************\n\n"
git push origin $branchName
fi
read -p "脚本运行结束"
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。