steamos-venv-pre-commit.bash: install pipx and pre-commit within it instead

This commit is contained in:
Aminda Suomalainen 2023-10-16 19:49:20 +03:00
parent fccdceda63
commit 027fc0329c
Signed by: Mikaela
SSH Key Fingerprint: SHA256:CXLULpqNBdUKB6E6fLA1b/4SzG0HvKD19PbIePU175Q
1 changed files with 4 additions and 1 deletions

View File

@ -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"