Test pour écran OLED 128 x 64 SSD1306 avec sonde thermique DS18B20

Committer:
diltech
Date:
Sat May 28 13:22:32 2022 +0000
Revision:
0:8ae2868c8c6c
Projet initial

Who changed what in which revision?

UserRevisionLine numberNew contents of line
diltech 0:8ae2868c8c6c 1 #!/bin/sh
diltech 0:8ae2868c8c6c 2 #
diltech 0:8ae2868c8c6c 3 # An example hook script to prepare the commit log message.
diltech 0:8ae2868c8c6c 4 # Called by "git commit" with the name of the file that has the
diltech 0:8ae2868c8c6c 5 # commit message, followed by the description of the commit
diltech 0:8ae2868c8c6c 6 # message's source. The hook's purpose is to edit the commit
diltech 0:8ae2868c8c6c 7 # message file. If the hook fails with a non-zero status,
diltech 0:8ae2868c8c6c 8 # the commit is aborted.
diltech 0:8ae2868c8c6c 9 #
diltech 0:8ae2868c8c6c 10 # To enable this hook, rename this file to "prepare-commit-msg".
diltech 0:8ae2868c8c6c 11
diltech 0:8ae2868c8c6c 12 # This hook includes three examples. The first one removes the
diltech 0:8ae2868c8c6c 13 # "# Please enter the commit message..." help message.
diltech 0:8ae2868c8c6c 14 #
diltech 0:8ae2868c8c6c 15 # The second includes the output of "git diff --name-status -r"
diltech 0:8ae2868c8c6c 16 # into the message, just before the "git status" output. It is
diltech 0:8ae2868c8c6c 17 # commented because it doesn't cope with --amend or with squashed
diltech 0:8ae2868c8c6c 18 # commits.
diltech 0:8ae2868c8c6c 19 #
diltech 0:8ae2868c8c6c 20 # The third example adds a Signed-off-by line to the message, that can
diltech 0:8ae2868c8c6c 21 # still be edited. This is rarely a good idea.
diltech 0:8ae2868c8c6c 22
diltech 0:8ae2868c8c6c 23 COMMIT_MSG_FILE=$1
diltech 0:8ae2868c8c6c 24 COMMIT_SOURCE=$2
diltech 0:8ae2868c8c6c 25 SHA1=$3
diltech 0:8ae2868c8c6c 26
diltech 0:8ae2868c8c6c 27 /usr/bin/perl -i.bak -ne 'print unless(m/^. Please enter the commit message/..m/^#$/)' "$COMMIT_MSG_FILE"
diltech 0:8ae2868c8c6c 28
diltech 0:8ae2868c8c6c 29 # case "$COMMIT_SOURCE,$SHA1" in
diltech 0:8ae2868c8c6c 30 # ,|template,)
diltech 0:8ae2868c8c6c 31 # /usr/bin/perl -i.bak -pe '
diltech 0:8ae2868c8c6c 32 # print "\n" . `git diff --cached --name-status -r`
diltech 0:8ae2868c8c6c 33 # if /^#/ && $first++ == 0' "$COMMIT_MSG_FILE" ;;
diltech 0:8ae2868c8c6c 34 # *) ;;
diltech 0:8ae2868c8c6c 35 # esac
diltech 0:8ae2868c8c6c 36
diltech 0:8ae2868c8c6c 37 # SOB=$(git var GIT_COMMITTER_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p')
diltech 0:8ae2868c8c6c 38 # git interpret-trailers --in-place --trailer "$SOB" "$COMMIT_MSG_FILE"
diltech 0:8ae2868c8c6c 39 # if test -z "$COMMIT_SOURCE"
diltech 0:8ae2868c8c6c 40 # then
diltech 0:8ae2868c8c6c 41 # /usr/bin/perl -i.bak -pe 'print "\n" if !$first_line++' "$COMMIT_MSG_FILE"
diltech 0:8ae2868c8c6c 42 # fi