@@ -23,6 +23,13 @@ show_usage() {
2323 echo " ARCH=\" x86_64\" (further supported values: i686)"
2424}
2525
26+ log () {
27+ tput setaf 3
28+ tput bold
29+ echo -* - " $@ "
30+ tput sgr0
31+ }
32+
2633APPDIR=
2734
2835while [ " $1 " != " " ]; do
@@ -41,8 +48,8 @@ while [ "$1" != "" ]; do
4148 exit 0
4249 ;;
4350 * )
44- echo " Invalid argument: $1 "
45- echo
51+ log " Invalid argument: $1 "
52+ log
4653 show_usage
4754 exit 1
4855 ;;
5764mkdir -p " $APPDIR "
5865
5966if [ " $CONDA_PACKAGES " == " " ]; then
60- echo " WARNING: \$ CONDA_PACKAGES not set, no packages will be installed!"
67+ log " WARNING: \$ CONDA_PACKAGES not set, no packages will be installed!"
6168fi
6269
6370# the user can specify a directory into which the conda installer is downloaded
@@ -69,14 +76,14 @@ if [ "$CONDA_DOWNLOAD_DIR" != "" ]; then
6976 CONDA_DOWNLOAD_DIR=" $( readlink -f " $CONDA_DOWNLOAD_DIR " ) "
7077 fi
7178
72- echo " Using user-specified download directory: $CONDA_DOWNLOAD_DIR "
79+ log " Using user-specified download directory: $CONDA_DOWNLOAD_DIR "
7380 mkdir -p " $CONDA_DOWNLOAD_DIR "
7481else
7582 # create temporary directory into which downloaded files are put
7683 CONDA_DOWNLOAD_DIR=" $( mktemp -d) "
7784
7885 _cleanup () {
79- if [ -d " $CONDA_DOWNLOAD_DIR " ]; then
86+ if [ -d " $CONDA_DOWNLOAD_DIR " ]; then
8087 rm -rf " $CONDA_DOWNLOAD_DIR "
8188 fi
8289 }
8592fi
8693
8794if [ -d " $APPDIR " /usr/conda ]; then
88- echo " Warning : conda prefix directory exists: $APPDIR /usr/conda"
89- echo " Please make sure you perform a clean build before releases to make sure your process works properly."
95+ log " WARNING : conda prefix directory exists: $APPDIR /usr/conda"
96+ log " Please make sure you perform a clean build before releases to make sure your process works properly."
9097fi
9198
9299ARCH=${ARCH:- x86_64}
@@ -100,7 +107,7 @@ case "$ARCH" in
100107 miniconda_installer_filename=Miniconda3-latest-Linux-x86.sh
101108 ;;
102109 * )
103- echo " Error : Unknown Miniconda arch: $ARCH "
110+ log " ERROR : Unknown Miniconda arch: $ARCH "
104111 exit 1
105112 ;;
106113esac
@@ -162,7 +169,7 @@ mkdir -p "$APPDIR"/usr/bin/
162169pushd " $APPDIR "
163170for i in usr/conda/bin/* ; do
164171 if [ -f usr/bin/" $( basename " $i " ) " ]; then
165- echo " Warning : symlink exists, will not be touched: usr/bin/$i "
172+ log " WARNING : symlink exists, will not be touched: usr/bin/$i "
166173 else
167174 ln -s ../../" $i " usr/bin/
168175 fi
0 commit comments