mirror of
https://github.com/cotes2020/jekyll-theme-chirpy.git
synced 2025-12-18 05:41:31 +00:00
Clear references to deleted folder docs
This commit is contained in:
@@ -28,16 +28,14 @@ check_status() {
|
||||
check_init() {
|
||||
local _has_inited=false
|
||||
|
||||
if [[ ! -d docs ]]; then
|
||||
if [[ ! -d .github ]]; then
|
||||
_has_inited=true # --no-gh
|
||||
else
|
||||
if [[ -f .github/workflows/$ACTIONS_WORKFLOW ]]; then
|
||||
# on BSD, the `wc` could contains blank
|
||||
local _count="$(find .github/workflows/ -type f -name "*.yml" | wc -l)"
|
||||
if [[ ${_count//[[:blank:]]/} == 1 ]]; then
|
||||
_has_inited=true
|
||||
fi
|
||||
if [[ ! -d .github ]]; then # using option `--no-gh`
|
||||
_has_inited=true
|
||||
else
|
||||
if [[ -f .github/workflows/$ACTIONS_WORKFLOW ]]; then
|
||||
# on BSD, the `wc` could contains blank
|
||||
local _count="$(find .github/workflows/ -type f -name "*.yml" | wc -l)"
|
||||
if [[ ${_count//[[:blank:]]/} == 1 ]]; then
|
||||
_has_inited=true
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
@@ -80,7 +78,7 @@ init_files() {
|
||||
|
||||
# remove the other fies
|
||||
rm -f .travis.yml
|
||||
rm -rf _posts/* docs
|
||||
rm -rf _posts/*
|
||||
|
||||
# save changes
|
||||
git add -A
|
||||
@@ -98,19 +96,19 @@ _no_gh=false
|
||||
while (($#)); do
|
||||
opt="$1"
|
||||
case $opt in
|
||||
--no-gh)
|
||||
_no_gh=true
|
||||
shift
|
||||
;;
|
||||
-h | --help)
|
||||
help
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
# unknown option
|
||||
help
|
||||
exit 1
|
||||
;;
|
||||
--no-gh)
|
||||
_no_gh=true
|
||||
shift
|
||||
;;
|
||||
-h | --help)
|
||||
help
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
# unknown option
|
||||
help
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
|
||||
Reference in New Issue
Block a user