1
0
mirror of https://github.com/cotes2020/jekyll-theme-chirpy.git synced 2025-12-18 05:41:31 +00:00

Improve the Shell code style.

This commit is contained in:
Cotes Chung
2020-08-19 17:05:58 +08:00
parent 038bccb3ca
commit 10ab9d3364
8 changed files with 86 additions and 85 deletions

View File

@@ -14,17 +14,18 @@ PAGES_BRANCH="gh-pages"
_no_branch=false
if [[ -z `git branch -av | grep $PAGES_BRANCH` ]]; then
if [[ -z $(git branch -av | grep "$PAGES_BRANCH") ]]; then
_no_branch=true
git checkout -b $PAGES_BRANCH
git checkout -b "$PAGES_BRANCH"
else
git checkout $PAGES_BRANCH
git checkout "$PAGES_BRANCH"
fi
mv _site ../
mv .git ../
rm -rf * && rm -rf .[^.] .??*
rm -rf ./*
rm -rf .[^.] .??*
mv ../_site/* .
mv ../.git .