summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Ergo Project) <jeroen.van.meeuwen@ergo-project.org>2010-09-09 10:00:19 (GMT)
committerJeroen van Meeuwen (Ergo Project) <jeroen.van.meeuwen@ergo-project.org>2010-09-09 10:00:19 (GMT)
commit901fe90846e70bbeafbb66f2af1175ad97c1c405 (patch)
tree389a2c834e055328d64ac0181bf70251eac8c99d
parent0c300c23c72b90566bb8d9304d009dcc563bfe96 (diff)
downloadkolab-docs-901fe90846e70bbeafbb66f2af1175ad97c1c405.tar.gz
Check in Hosted Kolab Makefile
-rw-r--r--Makefile41
1 files changed, 41 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..d7fe945
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,41 @@
+PRODUCT=Hosted Kolab
+VERSION=2.2.4
+
+BUILD_FORMATS="pdf html html-single"
+BUILD_LANGS="en-US"
+
+SRCDIR :=$(shell pwd)
+
+all: clean
+ @mkdir builds
+ @sed -i -r \
+ -e 's|ENTITY PRODUCT_VERSION "([\.0-9]+)"|ENTITY PRODUCT_VERSION "$(VERSION)"|g' \
+ -e 's|productnumber>([\.0-9]+)</productnumber|productnumber>$(VERSION)</productnumber|g' \
+ `find -type f -name "Book_Info.xml" -or -name "*.ent"`
+ for dir in `find -mindepth 1 -maxdepth 1 -type d -exec basename {} \; | sort`; do \
+ if [ -f "$$dir/publican.cfg" ]; then \
+ cd $$dir; \
+ publican build \
+ --formats=$(shell echo $(BUILD_FORMATS) | sed -e 's/ /,/g' -e 's/"//g') \
+ --langs=$(shell echo $(BUILD_LANGS) | sed -e 's/ /,/g' -e 's/"//g') \
+ || exit 1; \
+ for build in `find tmp/ -mindepth 2 -maxdepth 2 -type d | sort`; do \
+ [ "`basename $$build`" == "xml" ] && continue; \
+ [ "`basename $$build`" == "xml_tmp" ] && continue; \
+ lang=`echo $$build | awk -F'/' '{print $$2}'`; \
+ format=`echo $$build | awk -F'/' '{print $$3}'`; \
+ cp -a $$build $(SRCDIR)/builds/$(PRODUCT)-$(VERSION)-$$dir-$$lang.$$format; \
+ done; \
+ cd ../; \
+ fi; \
+ done
+
+clean:
+ @rm -rf builds
+ @for dir in `ls -d */`; do \
+ if [ -f "$$dir/publican.cfg" ]; then \
+ cd $$dir; \
+ publican clean; \
+ cd ../; \
+ fi; \
+ done