OneNet_IoT_demo for ASC platform

Dependencies:   Common_lib ESP8266 EdpKit_lib cJSON_lib driver_mbed_HP20x driver_mbed_TH02 wifi_example

Fork of mbed-os-example-esp8266 by ESP8266

Committer:
group-ESP8266
Date:
Thu Jan 12 20:21:45 2017 +0000
Revision:
0:b887535f68bf
Initial commit

Who changed what in which revision?

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