File: check_examples.sh

package info (click to toggle)
libcoap3 4.3.5-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,368 kB
  • sloc: ansic: 60,037; makefile: 1,280; sh: 938; python: 6
file content (18 lines) | stat: -rwxr-xr-x 385 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/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