summaryrefslogtreecommitdiff
path: root/pelican-compile.sh
diff options
context:
space:
mode:
authorPacien TRAN-GIRARD2017-05-11 21:28:27 +0200
committerPacien TRAN-GIRARD2017-05-11 21:28:27 +0200
commit4aea92c4f85fceb4e2a920f7a8beb37ce7d8c04c (patch)
tree2bf50e1f7b3abb3393388897bb93fc40778f73bb /pelican-compile.sh
parent2b03edb2f8172b131602171dca3f19186906e967 (diff)
downloaddesktop-utilities-4aea92c4f85fceb4e2a920f7a8beb37ce7d8c04c.tar.gz
Add pelican compile and dev-server convenience scripts
Diffstat (limited to 'pelican-compile.sh')
-rwxr-xr-xpelican-compile.sh46
1 files changed, 46 insertions, 0 deletions
diff --git a/pelican-compile.sh b/pelican-compile.sh
new file mode 100755
index 0000000..ac3d478
--- /dev/null
+++ b/pelican-compile.sh
@@ -0,0 +1,46 @@
1#!/usr/bin/env bash
2##
3# This section should match your Makefile
4##
5PY=${PY:-python}
6PELICAN=${PELICAN:-pelican}
7PELICANOPTS=
8
9BASEDIR=$(pwd)
10INPUTDIR=$BASEDIR/content
11OUTPUTDIR=$BASEDIR/output
12CONFFILE=$BASEDIR/pelicanconf.py
13
14###
15# Don't change stuff below here unless you are sure
16###
17
18SRV_PID=$BASEDIR/srv.pid
19PELICAN_PID=$BASEDIR/pelican.pid
20
21function usage(){
22 echo "usage: $0"
23 echo "This compiles the pelican site in the current directory,"
24 echo "using ./pelicanconf.py as configuration file,"
25 echo " ./content as input directory,"
26 echo " ./output as output directory (overwriting it)."
27 exit 3
28}
29
30function compile(){
31 echo "Compiling"
32 shift
33 rm -r $OUTPUTDIR
34 $PELICAN $INPUTDIR -o $OUTPUTDIR -s $CONFFILE $PELICANOPTS
35}
36
37###
38# MAIN
39###
40
41if [[ $1 == "help" ]]; then
42 usage
43else
44 compile
45fi
46