Created
October 21, 2016 23:51
-
-
Save rindeal/0116a402514b0d5f02b8f7aaa64df444 to your computer and use it in GitHub Desktop.
libstdc++_upgrade_packages.sh
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/bash - | |
# CREATED: 9.8.2015 01:04 | |
set -o nounset # Treat unset variables as an error | |
IFS=: read -ra pathComponents <<<"$PATH" | |
while IFS= read -rd '' x; do | |
ldd -r -- "$x" | grep -q libstdc++ && bins+=("$x") | |
done < <(find "${pathComponents[@]}" -type f -executable -print0) | |
typeset -A pkgs | |
while read -r x; do | |
: ${x:+"${pkgs[${x}]=}"} | |
done < <(equery -q b -n "${bins[@]}") | |
emerge -av1 "${!pkgs[@]}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment