OSDN Git Service

Add build script for JM guide
authorAkihiro MOTOKI <amotoki@users.sourceforge.jp>
Tue, 16 Feb 2016 21:29:46 +0000 (06:29 +0900)
committerAkihiro MOTOKI <amotoki@users.sourceforge.jp>
Tue, 16 Feb 2016 21:29:46 +0000 (06:29 +0900)
guide/.gitignore [new file with mode: 0644]
guide/Makefile.venv-wrap [new file with mode: 0644]
guide/build-jm-guide.sh [new file with mode: 0755]

diff --git a/guide/.gitignore b/guide/.gitignore
new file mode 100644 (file)
index 0000000..69fa449
--- /dev/null
@@ -0,0 +1 @@
+_build/
diff --git a/guide/Makefile.venv-wrap b/guide/Makefile.venv-wrap
new file mode 100644 (file)
index 0000000..c0c4f9e
--- /dev/null
@@ -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 (executable)
index 0000000..7fd35ec
--- /dev/null
@@ -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 $*