File size: 290 Bytes
c101ae6
 
 
 
 
 
 
95e9fee
c101ae6
1
2
3
4
5
6
7
8
9
10
#!/usr/bin/env sh


# set -euo pipefail

v=$(python -c 'import sys; v = sys.version_info; print(f"{v.major}.{v.minor}")')
for p in patches/*.diff; do
    patch -p0 -d"${HOME}/.pyenv/versions/$(python -V | cut -d ' ' -f 2)" < <(sed -e 's/venv\///' -e "s/python3.10/python${v}/" "${p}")
done