#!/usr/bin/env bash if [ "$(uname)" == "Darwin" ]; then PATH=$PATH:/usr/local/bin:/usr/local/sbin:/usr/local/opt/llvm/bin: elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then PATH=$PATH:/usr/local/bin:/usr/local/sbin:/usr/local/opt/llvm/bin: elif [ "$(expr substr $(uname -s) 1 10)" == "MINGW32_NT" ]; then PATH=$PATH:/usr/local/bin:/usr/local/sbin:/usr/local/opt/llvm/bin: fi # Enforce citra's whitespace policy git config --local core.whitespace tab-in-indent,trailing-space paths_to_check="src/ CMakeLists.txt" # If there are whitespace errors, print the offending file names and fail. if ! git diff --cached --check -- $paths_to_check ; then cat< ${TEMP} echo "!!! $f not compliant to coding style, here is the fix: ${TEMP} please open it in your diff viewer" fi fail=1 fi done exit "${fail-0}"