代码拉取完成,页面将自动刷新
#!/bin/bash
abort() {
echo "ERROR: $1!"
exit 1
}
ret=0
# Avoid conflicts with PATH overrides.
CHMOD="/bin/chmod"
CURL="/usr/bin/curl"
MKDIR="/bin/mkdir"
RM="/bin/rm"
UNZIP="/usr/bin/unzip"
if [ -z "${OVERRIDE_PYTHON3}" ]; then
# Use whatever is in PATH
OVERRIDE_PYTHON3=python3
fi
CLANG32_DIR="clang32"
CLANG32_SCRIPTS_URL="https://raw.githubusercontent.com/acidanthera/ocbuild/master/scripts/"
CLANG32_SCRIPTS=(
"fix-macho32"
"libtool32"
)
CLANG32_ZIP="clang-12.zip"
"${CURL}" -LfsO "https://github.com/acidanthera/ocbuild/releases/download/llvm-kext32-latest/${CLANG32_ZIP}" || ret=$?
if [ $ret -ne 0 ]; then
abort "Failed to download clang32 with code ${ret}"
fi
"${MKDIR}" "${CLANG32_DIR}"
if [ $ret -ne 0 ]; then
abort "Failed to create clang32 directory with code ${ret}"
fi
"${UNZIP}" -q "${CLANG32_ZIP}" -d "${CLANG32_DIR}" || ret=$?
if [ $ret -ne 0 ]; then
abort "Failed to extract downloaded clang32 with code ${ret}"
fi
"${RM}" -rf "${CLANG32_ZIP}"
# Download tools to override
for tool in "${CLANG32_SCRIPTS[@]}"; do
url="${CLANG32_SCRIPTS_URL}/${tool}"
"${CURL}" -Lfs "${url}" -o "${CLANG32_DIR}/${tool}" || ret=$?
if [ $ret -ne 0 ]; then
abort "Failed to download ${tool} with code ${ret}"
fi
"${CHMOD}" a+x "${CLANG32_DIR}/${tool}" || ret=$?
if [ $ret -ne 0 ]; then
abort "Failed to chmod ${tool} with code ${ret}"
fi
done
# macholib required for fix-macho32
"${OVERRIDE_PYTHON3}" -m pip install --disable-pip-version-check --user -q macholib || ret=$?
if [ $ret -ne 0 ]; then
abort "Failed to install macholib with code ${ret}"
fi
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。