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 prepare the commit log message.
MACRUM 0:615f90842ce8 4 # Called by "git commit" with the name of the file that has the
MACRUM 0:615f90842ce8 5 # commit message, followed by the description of the commit
MACRUM 0:615f90842ce8 6 # message's source. The hook's purpose is to edit the commit
MACRUM 0:615f90842ce8 7 # message file. If the hook fails with a non-zero status,
MACRUM 0:615f90842ce8 8 # the commit is aborted.
MACRUM 0:615f90842ce8 9 #
MACRUM 0:615f90842ce8 10 # To enable this hook, rename this file to "prepare-commit-msg".
MACRUM 0:615f90842ce8 11
MACRUM 0:615f90842ce8 12 # This hook includes three examples. The first comments out the
MACRUM 0:615f90842ce8 13 # "Conflicts:" part of a merge commit.
MACRUM 0:615f90842ce8 14 #
MACRUM 0:615f90842ce8 15 # The second includes the output of "git diff --name-status -r"
MACRUM 0:615f90842ce8 16 # into the message, just before the "git status" output. It is
MACRUM 0:615f90842ce8 17 # commented because it doesn't cope with --amend or with squashed
MACRUM 0:615f90842ce8 18 # commits.
MACRUM 0:615f90842ce8 19 #
MACRUM 0:615f90842ce8 20 # The third example adds a Signed-off-by line to the message, that can
MACRUM 0:615f90842ce8 21 # still be edited. This is rarely a good idea.
MACRUM 0:615f90842ce8 22
MACRUM 0:615f90842ce8 23 case "$2,$3" in
MACRUM 0:615f90842ce8 24 merge,)
MACRUM 0:615f90842ce8 25 /usr/bin/perl -i.bak -ne 's/^/# /, s/^# #/#/ if /^Conflicts/ .. /#/; print' "$1" ;;
MACRUM 0:615f90842ce8 26
MACRUM 0:615f90842ce8 27 # ,|template,)
MACRUM 0:615f90842ce8 28 # /usr/bin/perl -i.bak -pe '
MACRUM 0:615f90842ce8 29 # print "\n" . `git diff --cached --name-status -r`
MACRUM 0:615f90842ce8 30 # if /^#/ && $first++ == 0' "$1" ;;
MACRUM 0:615f90842ce8 31
MACRUM 0:615f90842ce8 32 *) ;;
MACRUM 0:615f90842ce8 33 esac
MACRUM 0:615f90842ce8 34
MACRUM 0:615f90842ce8 35 # SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p')
MACRUM 0:615f90842ce8 36 # grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1"