#!/bin/sh
#
# NAME: Miniforge3
# VER: 4.9.2-7
# PLAT: osx-arm64
# MD5: 11dea1ceac23c796ca1870c1ed99c692
unset DYLD_LIBRARY_PATH
if ! echo "$0" | grep '\.sh$' > /dev/null; then
printf 'Please run using "bash"/"dash"/"sh"/"zsh", but not "." or "source".\n' >&2
return 1
fi
THIS_DIR=$(DIRNAME=$(dirname "$0"); cd "$DIRNAME"; pwd)
THIS_FILE=$(basename "$0")
THIS_PATH="$THIS_DIR/$THIS_FILE"
PREFIX=$HOME/miniforge3
BATCH=0
FORCE=0
KEEP_PKGS=1
SKIP_SCRIPTS=0
TEST=0
REINSTALL=0
USAGE="
usage: $0 [options]
Installs Miniforge3 4.9.2-7
-b run install in batch mode (without manual intervention),
it is expected the license terms are agreed upon
-f no error if install prefix already exists
-h print this help message and exit
-p PREFIX install prefix, defaults to $PREFIX, must not contain spaces.
-s skip running pre/post-link/install scripts
-u update an existing installation
-t run package tests after installation (may install conda-build)
"
if which getopt > /dev/null 2>&1; then
OPTS=$(getopt bfhkp:sut "$*" 2>/dev/null)
if [ ! $? ]; then
printf "%s\\n" "$USAGE"
exit 2
fi
eval set -- "$OPTS"
while true; do
case "$1" in
-h)
printf "%s\\n" "$USAGE"
exit 2
;;
-b)
BATCH=1
shift
;;
-f)
FORCE=1
shift
;;
-k)
KEEP_PKGS=1
shift
;;
-p)
PREFIX="$2"
shift
shift
;;
-s)
SKIP_SCRIPTS=1
shift
;;
-u)
FORCE=1
shift
;;
-t)
TEST=1
shift
;;
--)
shift
break
;;
*)
printf "ERROR: did not recognize option '%s', please try -h\\n" "$1"
exit 1
;;
esac
done
else
while getopts "bfhkp:sut" x; do
case "$x" in
h)
printf "%s\\n" "$USAGE"
exit 2
;;
b)
BATCH=1
;;
f)
FORCE=1
;;
k)
KEEP_PKGS=1
;;
p)
PREFIX="$OPTARG"
;;
s)
SKIP_SCRIPTS=1
;;
u)
FORCE=1
;;
t)
TEST=1
;;
?)
printf "ERROR: did not recognize option '%s', please try -h\\n" "$x"
exit 1
;;
esac
done
fi
# For testing, keep the package cache around longer
CLEAR_AFTER_TEST=0
if [ "$TEST" = "1" ] && [ "$KEEP_PKGS" = "0" ]; then
CLEAR_AFTER_TEST=1
KEEP_PKGS=1
fi
if [ "$BATCH" = "0" ] # interactive mode
then
if [ "$(uname)" != "Darwin" ]; then
printf "WARNING:\\n"
printf " Your operating system does not appear to be macOS, \\n"
printf " but you are trying to install a macOS version of Miniforge3.\\n"
printf " Are sure you want to continue the installation? [yes|no]\\n"
printf "[no] >>> "
read -r ans
if [ "$ans" != "yes" ] && [ "$ans" != "Yes" ] && [ "$ans" != "YES" ] && \
[ "$ans" != "y" ] && [ "$ans" != "Y" ]
then
printf "Aborting installation\\n"
exit 2
fi
fi
printf "\\n"
printf "Welcome to Miniforge3 4.9.2-7\\n"
printf "\\n"
printf "In order to continue the installation process, please review the license\\n"
printf "agreement.\\n"
printf "Please, press ENTER to continue\\n"
printf ">>> "
read -r dummy
pager="cat"
if command -v "more" > /dev/null 2>&1; then
pager="more"
fi
"$pager" <<EOF
BSD 3-clause license
Copyright (c) 2019-2020, conda-forge
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors
may be used to endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
EOF
printf "\\n"
printf "Do you accept the license terms? [yes|no]\\n"
printf "[no] >>> "
read -r ans
while [ "$ans" != "yes" ] && [ "$ans" != "Yes" ] && [ "$ans" != "YES" ] && \
[ "$ans" != "no" ] && [ "$ans" != "No" ] && [ "$ans" != "NO" ]
do
printf "Please answer 'yes' or 'no':'\\n"
printf ">>> "
read -r ans
done
if [ "$ans" != "yes" ] && [ "$ans" != "Yes" ] && [ "$ans" != "YES" ]
then
printf "The license agreement wasn't approved, aborting installation.\\n"
exit 2
fi
printf "\\n"
printf "Miniforge3 will now be installed into this location:\\n"
printf "%s\\n" "$PREFIX"
printf "\\n"
printf " - Press ENTER to confirm the location\\n"
printf " - Press CTRL-C to abort the installation\\n"
printf " - Or specify a different location below\\n"
printf "\\n"
printf "[%s] >>> " "$PREFIX"
read -r user_prefix
if [ "$user_prefix" != "" ]; then
case "$user_prefix" in
*\ * )
printf "ERROR: Cannot install into directories with spaces\\n" >&2
exit 1
;;
*)
eval PREFIX="$user_prefix"
;;
esac
fi
fi # !BATCH
case "$PREFIX" in
*\ * )
printf "ERROR: Cannot install into directories with spaces\\n" >&2
exit 1
;;
esac
if [ "$FORCE" = "0" ] && [ -e "$PREFIX" ]; then
printf "ERROR: File or directory already exists: '%s'\\n" "$PREFIX" >&2
printf "If you want to update an existing installation, use the -u option.\\n" >&2
exit 1
elif [ "$FORCE" = "1" ] && [ -e "$PREFIX" ]; then
REINSTALL=1
fi
if ! mkdir -p "$PREFIX"; then
printf "ERROR: Could not create directory: '%s'\\n" "$PREFIX" >&2
exit 1
fi
# pwd does not convert two leading slashes to one
# https://github.com/conda/constructor/issues/284
PREFIX=$(cd "$PREFIX"; pwd | sed 's@//@/@')
export PREFIX
printf "PREFIX=%s\\n" "$PREFIX"
# 3-part dd from https://unix.stackexchange.com/a/121798/34459
# Using a larger block size greatly improves performance, but our payloads
# will not be aligned with block boundaries. The solution is to extract the
# bulk of the payload with a larger block size, and use a block size of 1
# only to extract the partial blocks at the beginning
最新版Miniforge3-MacOSX-arm64_20210324.sh
需积分: 49 39 浏览量
2021-03-24
23:17:44
上传
评论 1
收藏 34.13MB ZIP 举报
天河书阁VicRestart
- 粉丝: 3216
- 资源: 25
最新资源
- 徐州市区shp边界文件
- 简易数字频率计设计(原理图、PCB、源码、分析报告)
- 20225207038罗丽文财管专2201班.rar
- Golang:通过Gin框架+Redis+责任链,实现一个简单的钉钉机器人,进行消息处理 ps:多应用版
- 基于cnn和AlexNet的铝材缺陷检测内含数据集和demo原型2种方法
- 2023年各城市PM2.5, PM10, SO2, NO2等环境空气质量数据
- go 语言 实现的 使用modbus 协议 通过DTU tcp 链接 采集数据
- SHELL脚本(全是干货)
- Windows屏幕录屏软件
- 2022年各城市PM2.5, PM10, SO2, NO2等环境空气质量数据
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
评论0