aboutsummaryrefslogtreecommitdiffstats
path: root/make/createTagletProps.sh
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-03-02 20:52:40 +0100
committerSven Gothel <[email protected]>2011-03-02 20:52:40 +0100
commitbcf5d6ac871a29398b441df617923d3dd2cf35c1 (patch)
treed5fbd557dccd2e1f756b550ce4c0cd6f3380021a /make/createTagletProps.sh
parent65cd7d4be74539f7c6f5350ff38d02b44b5eb240 (diff)
parentd91bcf32f2d2767f4a84d835b6af78ade42ea870 (diff)
Merge remote-tracking branch 'remotes/mbien/master'v2.0-rc2
Diffstat (limited to 'make/createTagletProps.sh')
-rw-r--r--make/createTagletProps.sh34
1 files changed, 34 insertions, 0 deletions
diff --git a/make/createTagletProps.sh b/make/createTagletProps.sh
new file mode 100644
index 000000000..acd762bdd
--- /dev/null
+++ b/make/createTagletProps.sh
@@ -0,0 +1,34 @@
+root=http://www.opengl.org/sdk/docs/
+
+createProperties() {
+
+ toc=index.html
+ doc=${1}
+
+ #download index
+ wget ${root}/${doc}/xhtml/${toc};
+
+ #find lines with links to gl* function doc
+ grep -E .+\<a\ target=\"pagedisp\"\ href=\"gl[A-Z][^\"]+\"\>gl[A-Z][a-Z0-9]+\</a\>.+ ./${toc} > links;
+
+ #add all links as properties to file and cleanup
+ sed -r "s/.+<td><a target=\"pagedisp\" href=\"([a-Z0-9.]+)\">([a-Z0-9]+)<\/a><\/td>.*/\2 = ${doc}\/xhtml\/\1/" links | sort -u;
+
+ rm ./${toc} ./links
+
+}
+
+>tmp
+
+createProperties man | sed -e "s/man\//man2\//ig" >> tmp
+createProperties man3 >> tmp
+createProperties man4 >> tmp
+
+#add doc root to properties file
+echo "#Generated, do not edit, edit createTagletProps.sh instead.
+#This file is used in NativeTaglet and maps the generated method names
+#to the function specific OpenGL documentation man pages.
+nativetaglet.baseUrl=${root}" > native-taglet.properties;
+
+cat tmp | sort -k1,2 -r | awk '!x[$1]++' | tr -d [:blank:] | sort | sed -e "s/man2\//man\//ig" >> native-taglet.properties;
+rm tmp