Skip to content

Commit

Permalink
Use portable cut options (#50)
Browse files Browse the repository at this point in the history
--characters is not recognized by OSX
  • Loading branch information
metajiji authored and greg0ire committed Apr 14, 2017
1 parent 0b1e778 commit 4877b9c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion template/hooks/junkchecker/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ then
against=4b825dc642cb6eb9a060e54bf8d69288fbee4904
fi

for FILE in $(git diff-index --cached --name-status $against -- | cut --characters=3-); do
for FILE in $(git diff-index --cached --name-status $against -- | cut -c 3-); do
if [ -f "$FILE" ]
then
for line in $(cat "$junkchecker_phrases_file")
Expand Down
2 changes: 1 addition & 1 deletion template/hooks/syntaxchecker/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ else
against=4b825dc642cb6eb9a060e54bf8d69288fbee4904
fi

for FILE in $(git diff-index --cached --name-status $against -- | cut --characters=3-); do
for FILE in $(git diff-index --cached --name-status $against -- | cut -c 3-); do
if [ -f "$FILE" ]
then
if [ -f "$GIT_DIR/hooks/syntaxchecker/${FILE##*.}.sh" ]
Expand Down

0 comments on commit 4877b9c

Please sign in to comment.