Files
Dockerfiles/hexo/bootstrap.sh

18 lines
319 B
Bash
Raw Normal View History

2018-01-15 15:12:12 +08:00
#!/bin/sh
2016-11-11 18:33:18 +08:00
2018-01-15 15:12:12 +08:00
# configure git
2016-12-01 11:51:10 +08:00
git config --global user.email $GIT_EMAIL
git config --global user.name $GIT_NAME
2018-01-15 15:12:12 +08:00
# init hexo if dir is empty
2018-01-15 15:26:41 +08:00
if ! [ "$(ls -A ./ )" ]; then
hexo init && npm install
2018-01-15 15:12:12 +08:00
fi
# run hexo as production / developemnt mode
if [[ $1 == "production" ]]; then
hexo server -s
2018-01-15 16:36:37 +08:00
else
hexo server
2016-11-11 18:33:18 +08:00
fi