summaryrefslogtreecommitdiff
path: root/scripts/check-format-c
blob: 61c2b5c1e0de6a1e53ca6ff54a8b51415a788dbc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/bash
set -e

CUR_DIR="$( cd -P "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

indent --version || true

$CUR_DIR/gst-indent-all

if git diff --quiet -- ':!subprojects/gst-integration-testsuites/medias' .; then
    echo "Code is properly formatted"
else
    git diff --color=always -- ':!subprojects/gst-integration-testsuites/medias' .
echo 'style diverges, please run gst-indent first'
    exit 1
fi