docker_practice/.travis/docker-entrypoint.sh

20 lines
294 B
Bash
Raw Normal View History

2017-11-21 19:05:06 +08:00
#!/bin/sh
START=`date "+%F %T"`
if [ $1 = "sh" ];then sh ; exit 0; fi
rm -rf node_modules _book
cp -a . ../gitbook
cd ../gitbook
main(){
if [ "$1" = build ];then gitbook build; cp -a _book ../gitbook-src; echo $START; date "+%F %T"; exit 0; fi
gitbook serve
exit 0
}
main $1 $2 $3