summaryrefslogtreecommitdiff
path: root/Installation_Guide/Makefile
blob: d404559c81f64bafe46f4938634d0360c7525288 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
PACKAGE = "Installation_Guide"

all: clean clean_ids
	@for audience in enterprise community; do \
		sed -r -i -e "s/^condition:.*/condition: $$audience/g" publican.cfg; \
		publican build --langs=en-US --formats=html,html-single,pdf; \
		for format in html html-single pdf; do \
			mv tmp/en-US/$$format tmp/$$(echo $${audience:0:1} | tr '[:lower:]' '[:upper:]')$${audience:1}_en-US_$$format; \
		done; \
	done
	@sed -r -i -e 's/^condition:.*/condition: community/g' publican.cfg

upload: clean clean_ids
	@for audience in enterprise community; do \
		sed -r -i -e "s/^condition:.*/condition: $$audience/g" publican.cfg; \
		publican build --langs=en-US --formats=html,html-single,pdf; \
		rsync -aHvz tmp/en-US/{html,html-single,pdf} hosted.kolabsys.com:./public_html/kolab-2.3-docs/$$(echo $${audience:0:1} | tr '[:lower:]' '[:upper:]')$${audience:1}_$(PACKAGE)/; \
	done
	@sed -r -i -e 's/^condition:.*/condition: community/g' publican.cfg

clean:
	@publican clean

clean_ids:
	@cp -a ../Common_Content/en-US/*.xml en-US/.
	@publican clean_ids
	@sed -i -r \
		-e 's/\t/    /g' \
		-e 's/((\s{4})+)\s*/\1/g' \
		-e 's/\s*$$//g' \
		`find en-US/ -type f -name "*.xml"`