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

Clean up the discarded shell scripts

This commit is contained in:
Cotes Chung
2020-11-19 20:39:02 +08:00
parent 10bc44367a
commit 8fa1f3b497
10 changed files with 40 additions and 676 deletions

View File

@@ -14,10 +14,45 @@
DEST=_site
URL_IGNORE=cdn.jsdelivr.net
_build=false
help() {
echo "Usage:"
echo
echo " bash ./tools/test.sh [options]"
echo
echo "Options:"
echo " --build Run jekyll build before testing."
echo " -h, --help Print this information."
}
if [[ -n $1 && -d $1 ]]; then
DEST=$1
fi
while (($#)); do
opt="$1"
case $opt in
--build)
_build=true
shift
;;
-h | --help)
help
exit 0
;;
*)
# unknown option
help
exit 1
;;
esac
done
if $_build; then
JEKYLL_ENV=production bundle exec jekyll b
fi
bundle exec htmlproofer $DEST \
--disable-external \
--check-html \