]> git.saurik.com Git - apple/security.git/blob - xcscripts/install-test-framework.sh
Security-59754.41.1.tar.gz
[apple/security.git] / xcscripts / install-test-framework.sh
1 #!/bin/sh
2
3 framework="$1"
4
5 found=no
6
7 for a in ${TEST_FRAMEWORK_SEARCH_PATHS}; do
8 if test -d "${a}/${framework}" ; then
9 dst="${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}"
10
11 mkdir -p "${dst}" || { echo "mkdir failed with: $?" ; exit 1; }
12 ditto "${a}/${framework}" "${dst}/${framework}" || { echo "ditto failed with: $?" ; exit 1; }
13 find "${dst}/${framework}" \( -name Headers -o -name Modules -o -name '*.tbd' \) -delete
14 xcrun codesign -s - -f "${dst}/${framework}" || { echo "codesign failed with: $?" ; exit 1; }
15
16 found=yes
17 break
18 fi
19 done
20
21 test "X${found}" != "Xyes" && exit 1
22
23 exit 0