Repository navigation
Expand file tree
/
Copy pathtest.sh
More file actions
executable file
·72 lines (54 loc) · 1.99 KB
/
Copy pathtest.sh
File metadata and controls
executable file
·72 lines (54 loc) · 1.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/usr/bin/env bash
set -ex
echo "***** Start: Testing Miniforge installer *****"
export CONDA_PATH="${HOME}/miniforge"
CONSTRUCT_ROOT="${CONSTRUCT_ROOT:-${PWD}}"
cd "${CONSTRUCT_ROOT}"
echo "***** Get the installer *****"
ls build/
if [[ "$(uname)" == MINGW* ]]; then
EXT="exe";
else
EXT="sh";
fi
INSTALLER_PATH=$(find build/ -name "*forge*.${EXT}" | head -n 1)
echo "***** Run the installer *****"
chmod +x "${INSTALLER_PATH}"
if [[ "$(uname)" == MINGW* ]]; then
echo "start /wait \"\" ${INSTALLER_PATH} /InstallationType=JustMe /RegisterPython=0 /S /D=$(cygpath -w "${CONDA_PATH}")" > install.bat
cmd.exe /c install.bat
echo "***** Setup conda *****"
# shellcheck disable=SC1091
source "${CONDA_PATH}/Scripts/activate"
conda.exe config --set show_channel_urls true
echo "***** Print conda info *****"
conda.exe info
conda.exe list
echo "***** Check if we are bundling packages from msys2 or defaults *****"
conda.exe list | grep defaults && exit 1
conda.exe list | grep msys2 && exit 1
echo "***** Check if we can install a package which requires msys2 *****"
conda.exe install r-base --yes --quiet
conda.exe list
else
bash "${INSTALLER_PATH}" -b -p "${CONDA_PATH}"
echo "***** Setup conda *****"
# shellcheck disable=SC1091
source "${CONDA_PATH}/bin/activate"
echo "***** Print conda info *****"
conda info
conda list
fi
# 2020/09/15: Running conda update switches from pypy to cpython. Not sure why
# echo "***** Run conda update *****"
# conda update --all -y
echo "***** Python path *****"
python -c "import sys; print(sys.executable)"
python -c "import sys; assert 'miniforge' in sys.executable"
echo "***** Print system informations from Python *****"
python -c "print('Hello Miniforge !')"
python -c "import platform; print(platform.architecture())"
python -c "import platform; print(platform.system())"
python -c "import platform; print(platform.machine())"
python -c "import platform; print(platform.release())"
echo "***** Done: Testing installer *****"