misp-book/serve.sh

9 lines
247 B
Bash
Executable File

#!/bin/bash
# Kill any existing instances of "gitbook serve"
ps -Af | grep node | grep "gitbook serve" | awk '{print $2}' | xargs kill 2>/dev/null
if [ "$1" = "shutdown" ]; then echo "Goodbye!"; exit 0; fi;
# Launch the server
gitbook serve . &