improve pipupdate() reliablity

whole-command-tab-completion
bretello 2019-12-07 21:31:14 +01:00
parent 5e3aef5a42
commit c0571b1ceb
1 changed files with 5 additions and 2 deletions

View File

@ -226,8 +226,11 @@ function gitupdate(){
}
function pipupdate(){
for pip in pip2 pip2; do
$pip freeze --local | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 $pip install -U
for pip in pip2 pip3; do
if [ -z $pip ]; then
continue
fi
$pip freeze --local | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 $pip install -U
done
}