docker_practice/.travis/docker-entrypoint.sh
khs1994 5a00a6b32f Update CI
* Update drone to v1.x
* Add GitHub Actions
2019-08-31 21:15:51 +08:00

22 lines
309 B
Go
Executable File

#!/bin/sh
START=`date "+%F %T"`
if [ $1 = "sh" ];then sh ; exit 0; fi
rm -rf node_modules _book
srcDir=$PWD
cp -a . /srv/gitbook
cd /srv/gitbook
main(){
if [ "$1" = build ];then gitbook build; cp -a _book $srcDir; echo $START; date "+%F %T"; exit 0; fi
exec gitbook serve
exit 0
}
main $1 $2 $3