stk-code_catmod/data/shaders/check.sh
curaga 75e1c8bc69 Add an offline syntax checker for shaders
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@12815 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2013-05-30 19:21:12 +00:00

26 lines
340 B
Bash
Executable File

#!/bin/sh
#
# Run a syntax check on all the shaders.
#
# The utility glslopt may be gotten from github.com/clbr/glsl-optimizer.
out() {
rm -f *.out
echo Failed: $1
exit 1
}
for vert in *.vert; do
glslopt -v $vert
[ $? -ne 0 ] && out $vert
done
for frag in *.frag; do
glslopt -f $frag
[ $? -ne 0 ] && out $frag
done
rm -f *.out