Version of easy-connect with the u-blox cellular platforms C027 and C030 added.

Dependents:   HelloMQTT

Committer:
RobMeades
Date:
Fri Nov 03 13:01:23 2017 +0000
Revision:
6:304d3ba87a01
Parent:
0:19aa55d66228
Add comment concerning N2XX baud rate.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
group-ublox 0:19aa55d66228 1 #!/bin/sh
group-ublox 0:19aa55d66228 2 #
group-ublox 0:19aa55d66228 3 # An example hook script to verify what is about to be committed.
group-ublox 0:19aa55d66228 4 # Called by "git commit" with no arguments. The hook should
group-ublox 0:19aa55d66228 5 # exit with non-zero status after issuing an appropriate message if
group-ublox 0:19aa55d66228 6 # it wants to stop the commit.
group-ublox 0:19aa55d66228 7 #
group-ublox 0:19aa55d66228 8 # To enable this hook, rename this file to "pre-commit".
group-ublox 0:19aa55d66228 9
group-ublox 0:19aa55d66228 10 if git rev-parse --verify HEAD >/dev/null 2>&1
group-ublox 0:19aa55d66228 11 then
group-ublox 0:19aa55d66228 12 against=HEAD
group-ublox 0:19aa55d66228 13 else
group-ublox 0:19aa55d66228 14 # Initial commit: diff against an empty tree object
group-ublox 0:19aa55d66228 15 against=4b825dc642cb6eb9a060e54bf8d69288fbee4904
group-ublox 0:19aa55d66228 16 fi
group-ublox 0:19aa55d66228 17
group-ublox 0:19aa55d66228 18 # If you want to allow non-ascii filenames set this variable to true.
group-ublox 0:19aa55d66228 19 allownonascii=$(git config hooks.allownonascii)
group-ublox 0:19aa55d66228 20
group-ublox 0:19aa55d66228 21 # Redirect output to stderr.
group-ublox 0:19aa55d66228 22 exec 1>&2
group-ublox 0:19aa55d66228 23
group-ublox 0:19aa55d66228 24 # Cross platform projects tend to avoid non-ascii filenames; prevent
group-ublox 0:19aa55d66228 25 # them from being added to the repository. We exploit the fact that the
group-ublox 0:19aa55d66228 26 # printable range starts at the space character and ends with tilde.
group-ublox 0:19aa55d66228 27 if [ "$allownonascii" != "true" ] &&
group-ublox 0:19aa55d66228 28 # Note that the use of brackets around a tr range is ok here, (it's
group-ublox 0:19aa55d66228 29 # even required, for portability to Solaris 10's /usr/bin/tr), since
group-ublox 0:19aa55d66228 30 # the square bracket bytes happen to fall in the designated range.
group-ublox 0:19aa55d66228 31 test $(git diff --cached --name-only --diff-filter=A -z $against |
group-ublox 0:19aa55d66228 32 LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0
group-ublox 0:19aa55d66228 33 then
group-ublox 0:19aa55d66228 34 echo "Error: Attempt to add a non-ascii file name."
group-ublox 0:19aa55d66228 35 echo
group-ublox 0:19aa55d66228 36 echo "This can cause problems if you want to work"
group-ublox 0:19aa55d66228 37 echo "with people on other platforms."
group-ublox 0:19aa55d66228 38 echo
group-ublox 0:19aa55d66228 39 echo "To be portable it is advisable to rename the file ..."
group-ublox 0:19aa55d66228 40 echo
group-ublox 0:19aa55d66228 41 echo "If you know what you are doing you can disable this"
group-ublox 0:19aa55d66228 42 echo "check using:"
group-ublox 0:19aa55d66228 43 echo
group-ublox 0:19aa55d66228 44 echo " git config hooks.allownonascii true"
group-ublox 0:19aa55d66228 45 echo
group-ublox 0:19aa55d66228 46 exit 1
group-ublox 0:19aa55d66228 47 fi
group-ublox 0:19aa55d66228 48
group-ublox 0:19aa55d66228 49 # If there are whitespace errors, print the offending file names and fail.
group-ublox 0:19aa55d66228 50 exec git diff-index --check --cached $against --