Commit 830209b 1 parent ec982b5 commit 830209b Copy full SHA for 830209b
File tree 1 file changed +19
-2
lines changed
1 file changed +19
-2
lines changed Original file line number Diff line number Diff line change 11
11
12
12
# Project detection
13
13
read_project_name_file () {
14
- PROJECT_NAME_FILE=' ../../scripts/project_name.txt'
14
+ SCRIPT_DIR=$( pwd)
15
+
16
+ PROJECT_NAME_FILE=" scripts/project_name.txt"
17
+
18
+ if echo " $SCRIPT_DIR " | grep -q " /framework/scripts" || echo " $SCRIPT_DIR " | grep -q " /tests/scripts" ; then
19
+ PROJECT_NAME_FILE=" ../../scripts/project_name.txt"
20
+ elif echo " $SCRIPT_DIR " | grep -q " /mbedtls/scripts" || echo " $SCRIPT_DIR " | grep -q " /TF-PSA-Crypto/scripts" ; then
21
+ PROJECT_NAME_FILE=" project_name.txt"
22
+ fi
23
+
15
24
if read -r PROJECT_NAME < " $PROJECT_NAME_FILE " ; then : ; else
16
25
echo " $PROJECT_NAME_FILE does not exist... Exiting..." >&2
17
26
exit 1
@@ -30,7 +39,15 @@ in_tf_psa_crypto_repo () {
30
39
31
40
# Branch detection
32
41
read_build_info () {
33
- BUILD_INFO_FILE=' ../../include/mbedtls/build_info.h'
42
+ SCRIPT_DIR=$( pwd)
43
+
44
+ BUILD_INFO_FILE=" include/mbedtls/build_info.h"
45
+
46
+ if echo " $SCRIPT_DIR " | grep -q " /framework/scripts" || echo " $SCRIPT_DIR " | grep -q " /tests/scripts" ; then
47
+ BUILD_INFO_FILE=" ../../include/mbedtls/build_info.h"
48
+ elif echo " $SCRIPT_DIR " | grep -q " /mbedtls/scripts" ; then
49
+ BUILD_INFO_FILE=" ../include/mbedtls/build_info.h"
50
+ fi
34
51
35
52
if [ ! -f " $BUILD_INFO_FILE " ]; then
36
53
echo " File $BUILD_INFO_FILE not found."
You can’t perform that action at this time.
0 commit comments