#!/bin/sh # -*- mode: sh; fill-column: 75; tab-width: 8; coding: utf-8-unix -*- ROLE=base # https://www.commandlinefu.com/commands/view/5988/re-emerge-all-ebuilds-with-missing-files-gentoo-linux # Re-emerge all ebuilds with missing files (Gentoo Linux) qlist --installed --nocolor | uniq | while read cp; do qlist --exact $cp | grep -v '/usr/share/bash-completion\|/doc/' | while read file; do test -e "$file" || { echo $cp; echo "$cp: missing $file" 1>&2; break; }; done; done exit 0