Easily add all supported connectivity methods to your mbed OS project

Dependencies:   type-yd-driver

Committer:
MACRUM
Date:
Wed Jul 12 10:52:58 2017 +0000
Revision:
0:615f90842ce8
Initial commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
MACRUM 0:615f90842ce8 1 #!/bin/sh
MACRUM 0:615f90842ce8 2 #
MACRUM 0:615f90842ce8 3 # An example hook script to check the commit log message.
MACRUM 0:615f90842ce8 4 # Called by "git commit" with one argument, the name of the file
MACRUM 0:615f90842ce8 5 # that has the commit message. The hook should exit with non-zero
MACRUM 0:615f90842ce8 6 # status after issuing an appropriate message if it wants to stop the
MACRUM 0:615f90842ce8 7 # commit. The hook is allowed to edit the commit message file.
MACRUM 0:615f90842ce8 8 #
MACRUM 0:615f90842ce8 9 # To enable this hook, rename this file to "commit-msg".
MACRUM 0:615f90842ce8 10
MACRUM 0:615f90842ce8 11 # Uncomment the below to add a Signed-off-by line to the message.
MACRUM 0:615f90842ce8 12 # Doing this in a hook is a bad idea in general, but the prepare-commit-msg
MACRUM 0:615f90842ce8 13 # hook is more suited to it.
MACRUM 0:615f90842ce8 14 #
MACRUM 0:615f90842ce8 15 # SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p')
MACRUM 0:615f90842ce8 16 # grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1"
MACRUM 0:615f90842ce8 17
MACRUM 0:615f90842ce8 18 # This example catches duplicate Signed-off-by lines.
MACRUM 0:615f90842ce8 19
MACRUM 0:615f90842ce8 20 test "" = "$(grep '^Signed-off-by: ' "$1" |
MACRUM 0:615f90842ce8 21 sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || {
MACRUM 0:615f90842ce8 22 echo >&2 Duplicate Signed-off-by lines.
MACRUM 0:615f90842ce8 23 exit 1
MACRUM 0:615f90842ce8 24 }