| Manuel Pégourié-Gonnard | b3b8e43 | 2015-02-13 14:52:19 +0000 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |||||
| 3 | # check if generated files are up-to-date | ||||
| 4 | |||||
| 5 | set -eu | ||||
| 6 | |||||
| 7 | if [ -d library -a -d include -a -d tests ]; then :; else | ||||
| 8 | echo "Must be run from mbed TLS root" >&2 | ||||
| 9 | exit 1 | ||||
| 10 | fi | ||||
| 11 | |||||
| 12 | check() | ||||
| 13 | { | ||||
| 14 | FILE=$1 | ||||
| 15 | SCRIPT=$2 | ||||
| 16 | |||||
| 17 | cp $FILE $FILE.bak | ||||
| 18 | $SCRIPT | ||||
| 19 | diff $FILE $FILE.bak | ||||
| 20 | mv $FILE.bak $FILE | ||||
| 21 | } | ||||
| 22 | |||||
| 23 | check library/error.c scripts/generate_errors.pl | ||||
| 24 | check library/version_features.c scripts/generate_features.pl | ||||