Guest User

Untitled

a guest
Feb 23rd, 2018
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. if git rev-parse --verify HEAD >/dev/null 2>&1
  4. then
  5. against=HEAD
  6. else
  7. # Initial commit: diff against an empty tree object
  8. against=4b825dc642cb6eb9a060e54bf8d69288fbee4904
  9. fi
  10.  
  11. FILES=`git diff $against --name-only`
  12.  
  13. MESSAGE=(`./gradlew :app:ktlintFormat`)
  14. echo "${#MESSAGES[@]}"
  15.  
  16. for FILE in $FILES
  17. do
  18. git add $FILE
  19. done
  20.  
  21. exit 0
Add Comment
Please, Sign In to add comment