diff --git a/.ccignore b/.ccignore index 0aeaf52..f0cdcf3 100644 --- a/.ccignore +++ b/.ccignore @@ -1,5 +1,7 @@ README.md -prepapre-commit-msg +prepare-commit-msg post-commit -.sh +test.sh +test-files/basic.cpp +testfiles/thing.js LICENSE diff --git a/post-commit b/post-commit index bd44cfa..4d5e8df 100755 --- a/post-commit +++ b/post-commit @@ -12,12 +12,12 @@ IGNORED=( ".ccignore" ) # can be found DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" if echo "$DIR" | grep -qs 'git'; then - cd "$( echo "$DIR" | grep -Po '^.*(?=(\.git))' )" + cd "$( echo "$DIR" | pcregrep -o '^.*(?=(\.git))' )" fi if [ -f ".ccignore" ]; then - while IFS='' read -r line || [[ -n "$line" ]]; do - IGNORED+=( "$line" ) + while IFS='' read -r line || [[ -n "$line" ]]; do + IGNORED+=( "$line" ) done < ".ccignore" fi