Skip to content

Instantly share code, notes, and snippets.

@chrisforbes
Created November 7, 2012 01:52
Show Gist options
  • Save chrisforbes/4029085 to your computer and use it in GitHub Desktop.
Save chrisforbes/4029085 to your computer and use it in GitHub Desktop.
mesa gl3 prettifier
#!/bin/bash
set -e
mkdir -p raw out
rm raw/GL3.txt
wget -cO raw/GL3.txt http://cgit.freedesktop.org/mesa/mesa/plain/docs/GL3.txt
sed -i 's!\(GL_\)\?\(ARB\|NV\|AMD\|EXT\|KHR\|GLX\)_\([^ )]\+\)!<a href="http://www.opengl.org/registry/specs/\2/\3.txt">\0</a>!g' raw/GL3.txt
cat > raw/preamble << EOT
<!doctype html>
<head><title>GL3/4 Progress in Mesa</title></head>
<body style='white-space: pre;font-family:monospace'>
EOT
cat > raw/post << EOT
</body>
EOT
cat raw/preamble raw/GL3.txt > out/index.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment