Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Simple screen launcer for the PMD jekyll site
# Assuming GNU screen and bundler are installed, and `bundle install` has been run,
# this script starts the PMD documentation site server as a background screen.
# Kill the screen with option -k or --kill
# Install: change the PMD_GIT_DIR to match your pmd working directory, put in path and make executable
SCRIPT_NAME=$(basename $0)
case "$1" in
"--kill" | "-k")
if screen -list | grep -q "$SCRIPT_NAME"; then
screen -X -S "$SCRIPT_NAME" quit
exit 0
"--resume" | "-r")
if screen -list | grep -q "$SCRIPT_NAME"; then
screen -r "$SCRIPT_NAME"
if ! screen -list | grep -q "$SCRIPT_NAME"; then
cd "$PMD_GIT_DIR/docs"
screen -S "$SCRIPT_NAME" -d -m -- bundler exec jekyll serve
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.