]> git.saurik.com Git - apple/security.git/blobdiff - xcscripts/install-test-framework.sh
Security-58286.200.222.tar.gz
[apple/security.git] / xcscripts / install-test-framework.sh
diff --git a/xcscripts/install-test-framework.sh b/xcscripts/install-test-framework.sh
new file mode 100644 (file)
index 0000000..ae4aae1
--- /dev/null
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+framework="$1"
+
+found=no
+
+for a in ${TEST_FRAMEWORK_SEARCH_PATHS}; do
+    if test -d "${a}/${framework}" ; then
+        dst="${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}"
+
+           mkdir -p "{dst}" || { echo "mkdir failed with: $?" ; exit 1; }
+        ditto  "${a}/${framework}" "${dst}/${framework}" || { echo "ditto failed with: $?" ; exit 1; }
+        xcrun codesign -s - -f "${dst}/${framework}" || { echo "codesign failed with: $?" ; exit 1; }
+
+        found=yes
+           break
+    fi
+done
+
+test "X${found}" != "Xyes" && exit 1
+
+exit 0