代码拉取完成,页面将自动刷新
同步操作将从 Gitee 极速下载/freecad 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
##!/usr/bin/env bash
#
# MacOS Build Script for FreeCAD using Conda.
# This is intended for developer use.
#
# Copyright (c) 2020 by Jeffrey Zampieron. All rights reserved.
#
# License: LGPLv2.1
#
# References:
# - Conda: https://conda.io/projects/conda/en/latest/user-guide/install/index.html
# - Conda Build: https://docs.conda.io/projects/conda-build/en/latest/install-conda-build.html
###########################################################################
# Script wide setup.
###########################################################################
# The Conda environment name
FCENV=freecad_dev
# The cmake build directory
HOST=$(uname)
###########################################################################
# Env Checks
###########################################################################
if [[ ${HOST} =~ "Linux" ]]; then
# Linux specific checks here
echo "Linux specific checks..."
elif [[ ${HOST} =~ "Darwin" ]]; then
# OSX specific checks here.
echo "OS X specific checks..."
which xcrun
if [ $? != 0 ]; then
echo "xcrun not found... install XCode command line tools..."
echo "using: xcode-select --install"
exit 1
fi
else
echo "unknown host env... probably won't work. Aborting build."
exit 1
fi
###########################################################################
# Conda Setup
###########################################################################
which conda
if [ $? != 0 ]; then
echo "Failed to find conda executable. Please install."
exit 1
fi
if [[ "${CONDA_DEFAULT_ENV}" =~ "${FCENV}" ]]; then
echo "Already in env"
elif [[ -z "${CONDA_DEFAULT_ENV}" ]]; then
echo "Not in conda env... activating"
eval "$(conda shell.bash hook)"
conda activate ${FCENV}
else
# Assume we are in some other env.
echo "In ${CONDA_DEFAULT_ENV}, attempting switch to ${FCENV}"
eval "$(conda shell.bash hook)"
conda deactivate
conda activate ${FCENV}
fi
if [ $? != 0 ]; then
echo "Failed to activate conda env: ${FCENV} ... creating"
if [[ ${HOST} =~ "Linux" ]]; then
echo "Linux"
conda env create -f environment-linux.yml
elif [[ ${HOST} =~ "Darwin" ]]; then
echo "OS X"
conda env create -f environment-osx.yml
else
echo "Unknown Host: ${HOST}"
exit 1
fi
conda activate ${FCENV}
if [ $? != 0 ]; then
echo "Failed to create conda environment and activate it."
exit 1
fi
fi
if [ -z "${CONDA_PREFIX}" ]; then
echo "Failed to find CONDA_PREFIX variable."
exit 1
fi
PREFIX="${CONDA_PREFIX}" ./conda/build.sh
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。