From 97a1005d12910614a8d6295078d2cf735dd97a4d Mon Sep 17 00:00:00 2001 From: Bruno21 Date: Tue, 14 Dec 2021 11:44:47 +0100 Subject: [PATCH] pipx.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -test si pipx n'est pas installé --- plugins.d/pipx.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/plugins.d/pipx.sh b/plugins.d/pipx.sh index 4639608..737652d 100755 --- a/plugins.d/pipx.sh +++ b/plugins.d/pipx.sh @@ -24,6 +24,18 @@ 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) echo -e "\n${underline}List installed packages:${reset}" echo "$list"