不会写 shell 脚本的博主不是好程序员
```shell
#! /bin/bash
hosts="
xxxx.com"
msg="commit @
arloor $(date)"
# 上传到
arloor.github.iofunction githubio() {
dir=$PWD
rm -rf /tmp/
arloor.github.io hugo -d /tmp/
arloor.github.io &>/dev/null
cd /tmp/
arloor.github.io git init
git add . 2>/dev/null
git commit -m "init" 1>/dev/null
git remote add origin
https://github.com/arloor/arloor.github.io.git git push origin master -f
cd $dir
}
git pull && git add . && git commit -m "$msg" && git push && {
for host in $hosts; do
ssh
[email protected]${host} -t "
bash tarloor 1 #使用代理: bash tarloor 1
"
echo -e "\033[32m 请访问: https://"${host}"\033[0m"
done
} && {
# githubio
echo
} || {
echo -e "\033[32m 推送失败 \033[0m"
}
```