-
Notifications
You must be signed in to change notification settings - Fork 13
/
sync.sh
executable file
·81 lines (51 loc) · 2.23 KB
/
sync.sh
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#!/bin/sh
#
# Desktop OpenGL
#
rm -Rf gl
# Extension specifications, .spec and .tm files
wget -P gl --mirror --no-parent --no-host-directories --cut-dirs=1 --accept=txt,spec,tm,h \
http://www.opengl.org/registry/
# OpenGL Software Development Kit - manual pages for GL and GLSL
mkdir -p gl/docs
wget -P gl/docs --mirror --no-parent --no-host-directories --cut-dirs=4 --accept=html,css \
http://www.opengl.org/sdk/docs/man4/html/
# Tidy-up
rm gl/robots.txt gl/docs/robots.txt
# Leave out the old specs
rm gl/api/*.h
#
# OpenGL ES
#
rm -Rf gles
wget -P gles --mirror --no-parent --no-host-directories --cut-dirs=2 --accept=txt,spec,tm,h \
http://www.khronos.org/registry/gles/
# SDK - manual pages for ES
mkdir -p gles/docs
wget -P gles/docs --mirror --no-parent --no-host-directories --cut-dirs=5 --accept=html,css \
http://www.khronos.org/opengles/sdk/docs/man3/html/
# Tidy-up
rm gles/robots.txt gles/docs/robots.txt
#
# EGL
#
rm -Rf egl
wget -P egl --mirror --no-parent --no-host-directories --cut-dirs=2 --accept=txt,spec,tm,h,html \
http://www.khronos.org/registry/egl/
wget -P egl --mirror --no-parent --no-host-directories --cut-dirs=2 --accept=xhtml,css,jpg \
http://www.khronos.org/registry/egl/sdk/docs/man/html
# Tidy-up
rm egl/robots.txt
# Clean up 404 errors - pages that don't actually exist
find . -mindepth 2 -type f | xargs grep -l 'Page not found - Error 404' | xargs rm
find . -mindepth 2 -type f | xargs grep -l '404 ERROR - PAGE NOT FOUND' | xargs rm
find . -mindepth 2 -type f | xargs grep -l '404… Oops' | xargs rm
#
# XML specs
#
rm -Rf xml
wget -P xml --no-parent --no-host-directories --cut-dirs=8 https://cvs.khronos.org/svn/repos/ogl/trunk/doc/registry/public/api/egl.xml
wget -P xml --no-parent --no-host-directories --cut-dirs=8 https://cvs.khronos.org/svn/repos/ogl/trunk/doc/registry/public/api/gl.xml
wget -P xml --no-parent --no-host-directories --cut-dirs=8 https://cvs.khronos.org/svn/repos/ogl/trunk/doc/registry/public/api/glx.xml
wget -P xml --no-parent --no-host-directories --cut-dirs=8 https://cvs.khronos.org/svn/repos/ogl/trunk/doc/registry/public/api/wgl.xml
wget -P xml --no-parent --no-host-directories --cut-dirs=8 https://cvs.khronos.org/svn/repos/ogl/trunk/doc/registry/public/api/readme.pdf