mirror of
https://github.com/openharmony/third_party_libcoap.git
synced 2026-08-27 03:12:16 -04:00
6e406d242a
Signed-off-by: ye-xiaokang123 <yexiaokang3@huawei.com>
19 lines
385 B
Bash
19 lines
385 B
Bash
#!/bin/bash
|
|
|
|
rm -f man/tmp/*.c
|
|
man/examples-code-check man
|
|
EXIT1=$?
|
|
git add -f man/tmp/*.c
|
|
pre-commit run --all-files
|
|
EXIT2=$?
|
|
git diff man/tmp/*.c > man/tmp/diff-check
|
|
git restore man/tmp/*.c
|
|
git restore --staged man/tmp/*.c
|
|
cat man/tmp/diff-check
|
|
WC=`cat man/tmp/diff-check | wc -l`
|
|
if test "$EXIT1" != "0" || test "$EXIT2" != "0" || test "$WC" != "0" ; then
|
|
exit 1
|
|
else
|
|
exit 0
|
|
fi
|