From 000210d875a9eab01f4133595311598de5634388 Mon Sep 17 00:00:00 2001 From: Justin Mayer Date: Mon, 27 Aug 2012 13:09:25 -0700 Subject: [PATCH] Improve devserver durability. Refs #473. Three changes: 1. Fix inconsistent "pwd" behavior by using make's $(CURDIR) builtin. 2. Change bash shebang to the more-portable form. 3. Tell users when Pelican and SimpleHTTPServer have been backgrounded. --- pelican/tools/templates/Makefile.in | 2 +- pelican/tools/templates/develop_server.sh.in | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pelican/tools/templates/Makefile.in b/pelican/tools/templates/Makefile.in index 1445f0b0..4c5a4fcb 100644 --- a/pelican/tools/templates/Makefile.in +++ b/pelican/tools/templates/Makefile.in @@ -1,7 +1,7 @@ PELICAN=$pelican PELICANOPTS=$pelicanopts -BASEDIR=$$(pwd) +BASEDIR=$$(CURDIR) INPUTDIR=$$(BASEDIR)/content OUTPUTDIR=$$(BASEDIR)/output CONFFILE=$$(BASEDIR)/pelicanconf.py diff --git a/pelican/tools/templates/develop_server.sh.in b/pelican/tools/templates/develop_server.sh.in index b1e3b60c..3e97610b 100755 --- a/pelican/tools/templates/develop_server.sh.in +++ b/pelican/tools/templates/develop_server.sh.in @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ## # This section should match your Makefile ## @@ -65,6 +65,7 @@ function start_up(){ python -m SimpleHTTPServer & echo $$! > $$SRV_PID cd $$BASEDIR + sleep 1 && echo 'Pelican and SimpleHTTPServer processes now running in background.' } ###