Back to development
[platform/upstream/gstreamer.git] / scripts / check-format-c
1 #!/bin/bash
2 set -e
3
4 CUR_DIR="$( cd -P "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
5
6 indent --version || true
7
8 $CUR_DIR/gst-indent-all
9
10 if git diff --quiet -- ':!subprojects/gst-integration-testsuites/medias' .; then
11     echo "Code is properly formatted"
12 else
13     git diff --color=always -- ':!subprojects/gst-integration-testsuites/medias' .
14 echo 'style diverges, please run gst-indent first'
15     exit 1
16 fi