Manuel Pégourié-Gonnard | 8bcad48 | 2024-10-23 10:41:15 +0200 | [diff] [blame] | 1 | #! /usr/bin/env bash |
| 2 | |
| 3 | # all.sh |
| 4 | # |
| 5 | # Copyright The Mbed TLS Contributors |
| 6 | # SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later |
| 7 | |
| 8 | # This file is executable; it is the entry point for users and the CI. |
| 9 | # See "Files structure" in all-core.sh for other files used. |
| 10 | |
| 11 | # This script must be invoked from the project's root. |
| 12 | |
Manuel Pégourié-Gonnard | a4f0227 | 2024-10-24 10:05:36 +0200 | [diff] [blame] | 13 | # Prevent silly mistakes when people would invoke this from mbedtls |
Manuel Pégourié-Gonnard | 30e8eb9 | 2024-11-12 11:57:46 +0100 | [diff] [blame] | 14 | if [ -d tf-psa-crypto -a -d include/mbedtls ]; then |
Manuel Pégourié-Gonnard | a4f0227 | 2024-10-24 10:05:36 +0200 | [diff] [blame] | 15 | echo "When invoking this script from an mbedtls checkout," >&2 |
| 16 | echo "you must change the working directory to tf-psa-crypto." >&2 |
| 17 | exit 255 |
| 18 | fi |
| 19 | |
Manuel Pégourié-Gonnard | 30e8eb9 | 2024-11-12 11:57:46 +0100 | [diff] [blame] | 20 | if [ -d ../include/mbedtls -a -d ../framework ]; then |
| 21 | # Running inside an mbedtls checkout: get the framework from mbedtls. |
Elena Uziunaite | 8993fec | 2024-11-20 16:28:01 +0000 | [diff] [blame^] | 22 | FRAMEWORK="$PWD/../framework" |
Manuel Pégourié-Gonnard | 30e8eb9 | 2024-11-12 11:57:46 +0100 | [diff] [blame] | 23 | else |
| 24 | # Running standalone: use our own framework. |
Elena Uziunaite | 8993fec | 2024-11-20 16:28:01 +0000 | [diff] [blame^] | 25 | FRAMEWORK="$PWD/framework" |
Manuel Pégourié-Gonnard | 30e8eb9 | 2024-11-12 11:57:46 +0100 | [diff] [blame] | 26 | fi |
Manuel Pégourié-Gonnard | 8bcad48 | 2024-10-23 10:41:15 +0200 | [diff] [blame] | 27 | |
Elena Uziunaite | 8993fec | 2024-11-20 16:28:01 +0000 | [diff] [blame^] | 28 | source $FRAMEWORK/scripts/all-core.sh |
| 29 | |
Manuel Pégourié-Gonnard | 8bcad48 | 2024-10-23 10:41:15 +0200 | [diff] [blame] | 30 | main "$@" |