diff --git a/hooks/pre-commit b/hooks/pre-commit index 69b7ea18c..d3ad0cc0c 100755 --- a/hooks/pre-commit +++ b/hooks/pre-commit @@ -1,10 +1,14 @@ #!/usr/bin/env bash -if [[ $OSTYPE == darwin* ]] -then -export PATH=$PATH:$(brew --prefix)/opt/llvm/bin: +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