mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-01-01 09:10:03 +00:00
Move some proj detection code inside pre_check_environment
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
This commit is contained in:
parent
bda3e46846
commit
b55679736b
@ -116,12 +116,6 @@ set -e -o pipefail -u
|
||||
shopt -s extglob
|
||||
|
||||
# For project detection
|
||||
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 () {
|
||||
test "$PROJECT_NAME" = "Mbed TLS"
|
||||
}
|
||||
@ -131,6 +125,13 @@ in_tf_psa_crypto_repo () {
|
||||
}
|
||||
|
||||
pre_check_environment () {
|
||||
# For project detection
|
||||
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
|
||||
|
||||
if in_mbedtls_repo || in_tf_psa_crypto_repo; then :; else
|
||||
echo "Must be run from Mbed TLS / TF-PSA-Crypto root" >&2
|
||||
exit 1
|
||||
|
Loading…
Reference in New Issue
Block a user