Created
June 26, 2023 06:18
-
-
Save ScoreUnder/9c2129c2546db2c16b069287cc54a128 to your computer and use it in GitHub Desktop.
Find bad Python AUR packages on Arch Linux
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
#!/bin/sh | |
# Find bad Python AUR packages on Arch Linux | |
# Simply run the script and it should show you what needs updating | |
# Non-destructive. Arch Linux only. Will show incorrect results when multiple Python versions are installed side by side. | |
# Intended to provide tech support to people updating complex python projects from the AUR | |
real_python_dir=$(pacman -Ql python | grep /usr/lib/python | head -1 | cut -d/ -f-4 | cut -d' ' -f2) | |
set -- /usr/lib/python3.* | |
for d do | |
if [ -e "$d" ] && [ "$d" != "$real_python_dir" ]; then | |
set -- "$@" "$d" | |
fi | |
shift | |
done | |
if [ "$#" -ne 0 ]; then | |
printf '\033[1;31m%s\033[0m\n' 'WARNING: You have out-of-date python packages, as follows:' | |
pacman -Qo -- "$@" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment