Ai
1 Star 0 Fork 0

studvc/algorithm-archive

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
update_site.sh 898 Bytes
一键复制 编辑 原始数据 按行查看 历史
1v1_32 提交于 2020-07-08 21:12 +08:00 . Use HonKit instead of GitBook (#720)
#!/usr/bin/env bash
if [ $# -ge 1 ]; then
if [ $# -eq 2 ]; then
out_dir="$2"
else
if [ -z ${AAA_DIR+x} ]; then
echo "No output directory specified"
exit 1
fi
out_dir="$AAA_DIR"
fi
if [[ ! -d "$out_dir" ]]; then
echo "$out_dir is not a directory"
exit 1
fi
npm run build . /tmp/algorithm-archivists.github.io
if [ $? -ne 0 ]; then
echo "Failed to build the book"
exit 1
fi
cd "$out_dir"
git reset --hard && \
git clean -dfx && \
git pull origin master
if [ $? -ne 0 ]; then
echo "Failed to prepare repository"
exit 1
fi
cp -r /tmp/algorithm-archivists.github.io/* .
rm -r /tmp/algorithm-archivists.github.io
git add .
git commit -m "$1"
git push origin master
else
echo "No commit message specified"
fi
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/studvc/algorithm-archive.git
git@gitee.com:studvc/algorithm-archive.git
studvc
algorithm-archive
algorithm-archive
master

搜索帮助