mkvenv with colored output
This commit is contained in:
parent
67a6d7f108
commit
a513b7dff4
10
mkvenv
10
mkvenv
@ -22,14 +22,14 @@ for req_file in $(find $BASEPATH -name requirements.txt); do
|
|||||||
while read req_mod; do
|
while read req_mod; do
|
||||||
if [[ $req_mod = *[![:space:]]* ]]; then
|
if [[ $req_mod = *[![:space:]]* ]]; then
|
||||||
# req_mod is not empty
|
# req_mod is not empty
|
||||||
OUT=$($BASEPATH/venv/bin/pip install -U $req_mod)
|
OUT=$($BASEPATH/venv/bin/pip install -U $req_mod 2>&1 )
|
||||||
if [[ $OUT =~ "Successfully installed" ]]; then
|
if [[ $OUT =~ "Successfully installed" ]]; then
|
||||||
echo " * $req_mod installed."
|
echo -e " * \033[1;32m$req_mod installed.\e[0m"
|
||||||
elif [[ $OUT =~ "already satisfied" ]]; then
|
elif [[ $OUT =~ "already satisfied" ]]; then
|
||||||
echo " * $req_mod already installed."
|
echo -e " * \033[1;36m$req_mod already installed.\e[0m"
|
||||||
else
|
else
|
||||||
echo " * $req_mod installation FAILED!"
|
echo -e " * \033[1;31m$req_mod installation FAILED!\e[0m"
|
||||||
echo $OUT
|
#echo $OUT
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done < $req_file
|
done < $req_file
|
||||||
|
Loading…
x
Reference in New Issue
Block a user