SD card example code for Seeed Wio 3G

Fork of Wio_3G-example-sd-driver by Toyomasa Watarai

Committer:
MACRUM
Date:
Thu Aug 09 01:42:53 2018 +0000
Revision:
0:8eedb2495d52
Initial commit

Who changed what in which revision?

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