#!/usr/bin/env bash # pipx plugin for KYMSU # https://github.com/welcoMattic/kymsu # No distract mode (no user interaction) [[ $@ =~ "-nodistract" || $@ =~ "-n" ]] && no_distract=true || no_distract=false # Upgrade --include-injected injected=true # Add module to the do_not_update array for prevent to update. #declare -a do_not_update=() italic="\033[3m" underline="\033[4m" ita_under="\033[3;4m" bgd="\033[1;4;31m" red="\033[1;31m" bold="\033[1m" box="\033[1;41m" reset="\033[0m" echo -e "${bold}🛠 pipx (Python 3) ${reset}" if ! command -v pipx &> /dev/null then echo -e "${bold}pipx${reset} could not be found !\n" echo -e "You should install ${bold}pipx${reset}:\n" echo -e " - brew install pipx" echo -e " - pipx ensurepath" echo -e "or" echo -e " - python3 -m pip install --user pipx" echo -e " - python3 -m pipx ensurepath" exit fi list=$(pipx list --include-injected) # pipx list --quiet echo -e "\n${underline}List installed packages:${reset}" echo "$list" curl -Is https://www.apple.com | head -1 | grep 200 1>/dev/null if [[ $? -eq 1 ]]; then echo -e "\n${red}No Internet connection !${reset}" echo -e "Exit !" exit 1 fi pipx-outdated() { echo -e "\n${underline}Outdated Packages:${reset}" while read -sr pyPkgName pyPkyVersion; do local pypi_latest="$(curl -sS https://pypi.org/simple/${pyPkgName}/ | grep -o '>.*