wifi test

Dependencies:   X_NUCLEO_IKS01A2 mbed-http

Committer:
JMF
Date:
Wed Sep 05 14:28:24 2018 +0000
Revision:
0:24d3eb812fd4
Initial commit

Who changed what in which revision?

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