]>
Commit | Line | Data |
---|---|---|
2fbbb8fa | 1 | #!/bin/bash -x |
bdffa7b9 A |
2 | |
3 | if [ $# -ne 5 ]; then | |
4 | echo "Usage: $0 <dstroot> <srcroot> <action> <archs> <variants>" 1>&2 | |
5 | exit 1 | |
6 | fi | |
7 | ||
2fbbb8fa | 8 | DSTROOT="$1${INSTALL_PATH_PREFIX}" |
bdffa7b9 A |
9 | SRCROOT="$2" |
10 | ACTION="$3" | |
11 | ARCHS="$4" | |
12 | VARIANTS="$5" | |
13 | ||
14 | FPATH="/System/Library/Frameworks/System.framework" | |
15 | ||
16 | mkdir -p "${DSTROOT}/${FPATH}" || exit 1 | |
17 | ln -sf "Versions/Current/PrivateHeaders" "${DSTROOT}/${FPATH}/PrivateHeaders" || exit 1 | |
18 | ln -sf "Versions/Current/Resources" "${DSTROOT}/${FPATH}/Resources" || exit 1 | |
19 | ||
20 | mkdir -p "${DSTROOT}/${FPATH}/Versions" || exit 1 | |
21 | ln -sf "B" "${DSTROOT}/${FPATH}/Versions/Current" || exit 1 | |
22 | mkdir -p "${DSTROOT}/${FPATH}/Versions/B" || exit 1 | |
23 | ||
24 | for variant in ${VARIANTS}; do | |
25 | suffix="" | |
26 | if [ ${variant} != "normal" ]; then | |
27 | suffix="_${variant}" | |
28 | fi | |
29 | ln -sf "Versions/Current/System${suffix}" "${DSTROOT}/${FPATH}/System${suffix}" || exit 1 | |
bdffa7b9 | 30 | |
2fbbb8fa A |
31 | if [[ "${PLATFORM_NAME}" =~ simulator ]] ; then |
32 | ln -sf "../../../../../../usr/lib/libSystem${suffix}.dylib" "${DSTROOT}/${FPATH}/Versions/B/System${suffix}" || exit 1 | |
33 | else | |
34 | ln -sf "../../../../../../usr/lib/libSystem.B${suffix}.dylib" "${DSTROOT}/${FPATH}/Versions/B/System${suffix}" || exit 1 | |
35 | fi | |
bdffa7b9 | 36 | done |