2015-12-15 03:50:56 +08:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -o errexit -o nounset
|
|
|
|
|
|
|
|
rev=$(git rev-parse --short HEAD)
|
|
|
|
|
|
|
|
cd book
|
|
|
|
|
|
|
|
git init
|
2021-05-09 14:49:31 +08:00
|
|
|
git config user.name "Aaran Xu"
|
|
|
|
git config user.email "aaranxu@outlook.com"
|
2015-12-15 03:50:56 +08:00
|
|
|
|
2017-02-04 18:10:17 +08:00
|
|
|
git remote add upstream "git@github.com:rust-lang-cn/book-cn.git"
|
2015-12-15 03:50:56 +08:00
|
|
|
git fetch upstream
|
|
|
|
git reset upstream/gh-pages
|
|
|
|
|
|
|
|
touch .
|
|
|
|
|
|
|
|
git add -A .
|
|
|
|
git commit -m "rebuild pages at ${rev}"
|
2016-11-21 01:30:50 +08:00
|
|
|
git push -q upstream HEAD:gh-pages > /dev/null 2>&1
|
2022-02-13 04:10:20 +08:00
|
|
|
|
|
|
|
|
|
|
|
cd ../english/book
|
|
|
|
|
|
|
|
git init
|
|
|
|
git config user.name "Aaran Xu"
|
|
|
|
git config user.email "aaranxu@outlook.com"
|
|
|
|
|
|
|
|
git remote add upstream "git@github.com:rust-lang-cn/book-cn.git"
|
|
|
|
git fetch upstream
|
|
|
|
git reset upstream/gh-pages-en
|
|
|
|
|
|
|
|
touch .
|
|
|
|
|
|
|
|
git add -A .
|
|
|
|
git commit -m "rebuild English pages at ${rev}"
|
|
|
|
git push -q upstream HEAD:gh-pages-en > /dev/null 2>&1
|