mirror of
https://github.com/ARMmbed/mbedtls.git
synced 2025-05-10 08:59:05 +08:00
Add option to list the generated files and exit
This is useful during the release process, when we want to commit the generated files. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
parent
494678a405
commit
1fe01acfc3
@ -23,12 +23,13 @@ set -eu
|
|||||||
|
|
||||||
if [ $# -ne 0 ] && [ "$1" = "--help" ]; then
|
if [ $# -ne 0 ] && [ "$1" = "--help" ]; then
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
$0 [-u]
|
$0 [-l | -u]
|
||||||
This script checks that all generated file are up-to-date. If some aren't, by
|
This script checks that all generated file are up-to-date. If some aren't, by
|
||||||
default the scripts reports it and exits in error; with the -u option, it just
|
default the scripts reports it and exits in error; with the -u option, it just
|
||||||
updates them instead.
|
updates them instead.
|
||||||
|
|
||||||
-u Update the files rather than return an error for out-of-date files.
|
-u Update the files rather than return an error for out-of-date files.
|
||||||
|
-l List generated files, but do not update them.
|
||||||
EOF
|
EOF
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
@ -39,10 +40,13 @@ if [ -d library -a -d include -a -d tests ]; then :; else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
UPDATE=
|
UPDATE=
|
||||||
if [ $# -ne 0 ] && [ "$1" = "-u" ]; then
|
LIST=
|
||||||
shift
|
while getopts lu OPTLET; do
|
||||||
UPDATE='y'
|
case $OPTLET in
|
||||||
fi
|
l) LIST=1;;
|
||||||
|
u) UPDATE=1;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
# check SCRIPT FILENAME[...]
|
# check SCRIPT FILENAME[...]
|
||||||
# check SCRIPT DIRECTORY
|
# check SCRIPT DIRECTORY
|
||||||
@ -58,6 +62,11 @@ check()
|
|||||||
SCRIPT=$1
|
SCRIPT=$1
|
||||||
shift
|
shift
|
||||||
|
|
||||||
|
if [ -n "$LIST" ]; then
|
||||||
|
printf '%s\n' "$@"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
directory=
|
directory=
|
||||||
if [ -d "$1" ]; then
|
if [ -d "$1" ]; then
|
||||||
directory="$1"
|
directory="$1"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user