Last active
December 30, 2021 12:58
-
-
Save dandye/9b30244dbae43d960b667235f77467b4 to your computer and use it in GitHub Desktop.
make target to quickly find and update shebangs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
update_shebangs: | |
grep -m1 -r -l '^#!.*python' venv/bin/ | while read -r filename; do \ | |
echo "$${filename}"; \ | |
head -n1 "$${filename}"; \ | |
sed -i -e '1 s|^#!.*python|#!/opt/rh/rh-python38/root/bin/python|' "$${filename}"; \ | |
head -n1 "$${filename}"; \ | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment