mirror of
https://github.com/yeasy/docker_practice.git
synced 2024-12-27 15:36:17 +00:00
48718d6035
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
22 lines
317 B
Go
Executable File
22 lines
317 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
|