From 45b3b36c4aa52ceb1988beb44f048323a41b28ab Mon Sep 17 00:00:00 2001 From: noah the goodra Date: Tue, 31 Jan 2017 10:06:58 -0600 Subject: [PATCH] added check for each platform --- hooks/pre-commit | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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