From 2bd3f2c37006c4ebed857a9c36ff14612d48abc1 Mon Sep 17 00:00:00 2001 From: Akihiro MOTOKI Date: Wed, 17 Feb 2016 06:29:46 +0900 Subject: [PATCH] Add build script for JM guide --- guide/.gitignore | 1 + guide/Makefile.venv-wrap | 14 ++++++++++++++ guide/build-jm-guide.sh | 24 ++++++++++++++++++++++++ 3 files changed, 39 insertions(+) create mode 100644 guide/.gitignore create mode 100644 guide/Makefile.venv-wrap create mode 100755 guide/build-jm-guide.sh diff --git a/guide/.gitignore b/guide/.gitignore new file mode 100644 index 00000000..69fa449d --- /dev/null +++ b/guide/.gitignore @@ -0,0 +1 @@ +_build/ diff --git a/guide/Makefile.venv-wrap b/guide/Makefile.venv-wrap new file mode 100644 index 00000000..c0c4f9e1 --- /dev/null +++ b/guide/Makefile.venv-wrap @@ -0,0 +1,14 @@ +include ../JM.rules + +all: build-guide + +build-guide: + bash -x build-jm-guide.sh html + +_build/html/index.html: build-guide + +clean: + bash -x build-jm-guide.sh clean + +install: _build/html/index.html + rsync -av --delete _build/html/ $(WWWROOT)/guide diff --git a/guide/build-jm-guide.sh b/guide/build-jm-guide.sh new file mode 100755 index 00000000..7fd35ec5 --- /dev/null +++ b/guide/build-jm-guide.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +JMHOME=${JMHOME:-/home/groups/l/li/linuxjm} +VENV=$JMHOME/venv +JM_GIT=$HOME/jm + +LOCAL_PIP_BASE=$HOME/.local +GET_PIP_URL=https://raw.github.com/pypa/pip/master/contrib/get-pip.py + +if [ ! -f $LOCAL_PIP_BASE/bin/pip ]; then + wget $GET_PIP_URL + python get-pip.py --user + rm -f get-pip.py +fi +if [ ! -f $LOCAL_PIP_BASE/bin/virtualenv ]; then + $LOCAL_PIP_BASE/bin/pip install --user virtualenv +fi +if [ ! -d $VENV ]; then + $LOCAL_PIP_BASE/bin/virtualenv $VENV +fi + +. $VENV/bin/activate +pip install sphinx sphinx-bootstrap-theme +make $* -- 2.11.0