summaryrefslogtreecommitdiff
path: root/.scripts
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2013-03-02 13:57:35 +0100
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2013-03-02 13:57:35 +0100
commite0fc517f96aaf86e8348ecc5f063add9d18d5f1f (patch)
treeaf254a177d5462a06b4183d62b10a456f7a9d285 /.scripts
parentf90eab9b57ef058ef239fa6921bdcb198af5b06a (diff)
downloaddotfiles-e0fc517f96aaf86e8348ecc5f063add9d18d5f1f.tar.gz
dotfiles-e0fc517f96aaf86e8348ecc5f063add9d18d5f1f.tar.bz2
dotfiles-e0fc517f96aaf86e8348ecc5f063add9d18d5f1f.zip
Add script to automatically remove preserved libs by portage
Execute revdep-rebuild only if necessary, i.e. the file still exists..
Diffstat (limited to '.scripts')
-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