dotfiles/local/share/updateall/commands.d/.pip
2023-04-13 00:16:36 +02:00

13 lines
365 B
Text

# Gathering the outdated packages list
echo "Gathering the outdated packages list..."
py_pkglist=$(pip3 list --outdated --format=freeze | grep -v '^\-e' | cut -d '=' -f 1)
# Updating
if [ ! -z "$py_pkglist" ]; then
echo $py_pkglist | xargs -n 1 pip3 install -U
else
echo "All packages are up to date."
fi
# Unsetting the variable
unset py_pkglist