mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-28 00:21:48 +03:00
Check for file at script startup
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
This commit is contained in:
@ -32,13 +32,13 @@ set -eu
|
|||||||
|
|
||||||
# Project detection
|
# Project detection
|
||||||
PROJECT_NAME_FILE='./scripts/project_name.txt'
|
PROJECT_NAME_FILE='./scripts/project_name.txt'
|
||||||
|
if read -r PROJECT_NAME < "$PROJECT_NAME_FILE"; then :; else
|
||||||
|
echo "$PROJECT_NAME_FILE does not exist... Exiting..." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
in_mbedtls_repo () {
|
in_mbedtls_repo () {
|
||||||
if [ ! -f $PROJECT_NAME_FILE ]; then
|
test "$PROJECT_NAME" = "Mbed TLS"
|
||||||
echo "$PROJECT_NAME_FILE does not exist... Exiting..." >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
grep -Fxq "Mbed TLS" "$PROJECT_NAME_FILE"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Collect stats and build a HTML report.
|
# Collect stats and build a HTML report.
|
||||||
|
@ -117,21 +117,17 @@ shopt -s extglob
|
|||||||
|
|
||||||
# For project detection
|
# For project detection
|
||||||
PROJECT_NAME_FILE='./scripts/project_name.txt'
|
PROJECT_NAME_FILE='./scripts/project_name.txt'
|
||||||
|
if read -r PROJECT_NAME < "$PROJECT_NAME_FILE"; then :; else
|
||||||
|
echo "$PROJECT_NAME_FILE does not exist... Exiting..." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
in_mbedtls_repo () {
|
in_mbedtls_repo () {
|
||||||
if [ ! -f $PROJECT_NAME_FILE ]; then
|
test "$PROJECT_NAME" = "Mbed TLS"
|
||||||
echo "$PROJECT_NAME_FILE does not exist... Exiting..." >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
grep -Fxq "Mbed TLS" "$PROJECT_NAME_FILE"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
in_tf_psa_crypto_repo () {
|
in_tf_psa_crypto_repo () {
|
||||||
if [ ! -f $PROJECT_NAME_FILE ]; then
|
test "$PROJECT_NAME" = "TF-PSA-Crypto"
|
||||||
echo "$PROJECT_NAME_FILE does not exist... Exiting..." >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
grep -Fxq "TF-PSA-Crypto" "$PROJECT_NAME_FILE"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pre_check_environment () {
|
pre_check_environment () {
|
||||||
|
Reference in New Issue
Block a user