summaryrefslogtreecommitdiff
path: root/.scripts/remove_preserved_libs.sh
diff options
context:
space:
mode:
Diffstat (limited to '.scripts/remove_preserved_libs.sh')
-rwxr-xr-x.scripts/remove_preserved_libs.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/.scripts/remove_preserved_libs.sh b/.scripts/remove_preserved_libs.sh
new file mode 100755
index 0000000..2a92a60
--- /dev/null
+++ b/.scripts/remove_preserved_libs.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+sed -n "s/^ *# revdep-rebuild --library '\([^']*\)'.*$/\1/p" /var/log/portage/elog/*.log | \
+ sort | uniq | \
+ while read lib
+ do
+ cmd="test -e '${lib}' && revdep-rebuild -i --library '${lib}' && rm '${lib}'"
+ echo $cmd
+ eval $cmd
+ done