From 1fe40db3cb3309e7a43816581babe469b25dac53 Mon Sep 17 00:00:00 2001 From: HiPhish Date: Sat, 14 Nov 2015 00:17:09 +0100 Subject: [PATCH] Generate output directory before 'CD'ing into it. If the output directory does not exist the 'cd' will fail, but the script will resume, starting the server in the base directory. Therefore we first make sure the output directory actually exists. --- pelican/tools/templates/develop_server.sh.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pelican/tools/templates/develop_server.sh.in b/pelican/tools/templates/develop_server.sh.in index 732069c2..e345fefd 100755 --- a/pelican/tools/templates/develop_server.sh.in +++ b/pelican/tools/templates/develop_server.sh.in @@ -65,7 +65,7 @@ function start_up(){ $$PELICAN --debug --autoreload -r $$INPUTDIR -o $$OUTPUTDIR -s $$CONFFILE $$PELICANOPTS & pelican_pid=$$! echo $$pelican_pid > $$PELICAN_PID - cd $$OUTPUTDIR + mkdir -p $$OUTPUTDIR && cd $$OUTPUTDIR $PY -m pelican.server $$port & srv_pid=$$! echo $$srv_pid > $$SRV_PID