1 Star 0 Fork 1

btwise/ocbuild

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
clang32-bootstrap.sh 1.56 KB
一键复制 编辑 原始数据 按行查看 历史
btwise 提交于 2022-12-28 15:34 . update from acidanthera
#!/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
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/btwise/ocbuild.git
git@gitee.com:btwise/ocbuild.git
btwise
ocbuild
ocbuild
master

搜索帮助