From 027fc0329cad2e15d37a16902a6352a4224f3b03 Mon Sep 17 00:00:00 2001 From: Aminda Suomalainen Date: Mon, 16 Oct 2023 19:49:20 +0300 Subject: [PATCH] steamos-venv-pre-commit.bash: install pipx and pre-commit within it instead --- bash/steamos-venv-pre-commit.bash | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bash/steamos-venv-pre-commit.bash b/bash/steamos-venv-pre-commit.bash index 27d1445..1b857fb 100755 --- a/bash/steamos-venv-pre-commit.bash +++ b/bash/steamos-venv-pre-commit.bash @@ -17,7 +17,10 @@ mkdir -p ~/venv python3 -m venv ~/venv . ~/venv/bin/activate python3 -m pip install pip --upgrade -python3 -m pip install pre-commit --upgrade +python3 -m pip install pipx --upgrade +python3 -m pipx install pre-commit +python3 -m pipx upgrade-all + # Removes duplicates from $PATH. Copied from https://unix.stackexchange.com/a/14896 PATH=$(echo "$PATH" | awk -v RS=':' -v ORS=":" '!a[$1]++{if (NR > 1) printf ORS; printf $a[$1]}') printf "Remember to apply the following somewhere appropiate:\nPATH=$PATH"