blob: 9c7547b8be6e6ac2130c43a0e16c5c11d5e819ff [file] [log] [blame]
Manuel Pégourié-Gonnard8bcad482024-10-23 10:41:15 +02001#! /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é-Gonnarda4f02272024-10-24 10:05:36 +020013# Prevent silly mistakes when people would invoke this from mbedtls
Manuel Pégourié-Gonnard30e8eb92024-11-12 11:57:46 +010014if [ -d tf-psa-crypto -a -d include/mbedtls ]; then
Manuel Pégourié-Gonnarda4f02272024-10-24 10:05:36 +020015 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
18fi
19
Manuel Pégourié-Gonnard30e8eb92024-11-12 11:57:46 +010020if [ -d ../include/mbedtls -a -d ../framework ]; then
21 # Running inside an mbedtls checkout: get the framework from mbedtls.
Elena Uziunaite8993fec2024-11-20 16:28:01 +000022 FRAMEWORK="$PWD/../framework"
Manuel Pégourié-Gonnard30e8eb92024-11-12 11:57:46 +010023else
24 # Running standalone: use our own framework.
Elena Uziunaite8993fec2024-11-20 16:28:01 +000025 FRAMEWORK="$PWD/framework"
Manuel Pégourié-Gonnard30e8eb92024-11-12 11:57:46 +010026fi
Manuel Pégourié-Gonnard8bcad482024-10-23 10:41:15 +020027
Elena Uziunaite8993fec2024-11-20 16:28:01 +000028source $FRAMEWORK/scripts/all-core.sh
29
Manuel Pégourié-Gonnard8bcad482024-10-23 10:41:15 +020030main "$@"