base_role/overlay/Gentoo/usr/local/sbin/gentoo_rebuild_missing.bash
embed@git.macaw.me b50fd16591 first
2024-01-06 01:38:28 +00:00

16 lines
506 B
Bash
Executable File

#!/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