1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
GITHUB="https://github.com" DSTDIR="/home/ghw/wwwroot"
REPOS="gehaowu/gehaowu.github.io master www.gehaowu.com gehaowu/zh-Hans gh-pages www.gehaowu.com/zh-Hans gehaowu/notes gh-pages www.gehaowu.com/notes gehaowu/albums gh-pages www.gehaowu.com/albums gehaowu/resume gh-pages www.gehaowu.com/resume gehaowu/data gh-pages www.gehaowu.com/data gehaowu/Resources gh-pages www.gehaowu.com/Resources"
while read repo branch dir do (cd "${DSTDIR}/${dir}" && git pull) if [ "$?" -ne 0 ]; then rm -fr "${DSTDIR}/${dir}" git clone --depth 1 -b "${branch}" "${GITHUB}/${repo}" "${DSTDIR}/${dir}" fi done <<-EOF ${REPOS} EOF
|