From 0e484c32acff11905650feaac016bbc1941d2bc3 Mon Sep 17 00:00:00 2001 From: "Rick Farina (Zero_Chaos)" Date: Fri, 12 Apr 2019 13:24:14 -0400 Subject: [PATCH] bug-461824: use cleaner file names --- scripts/bug-461824.sh | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/scripts/bug-461824.sh b/scripts/bug-461824.sh index 6921a67f4..78fdf2b4c 100755 --- a/scripts/bug-461824.sh +++ b/scripts/bug-461824.sh @@ -1,26 +1,21 @@ #!/bin/bash #work around for detecting and fixing bug #461824 -#CORES="$(grep -c ^proc /proc/cpuinfo)" -#if [[ "${CORES}" -eq "0" ]] ; then CORES="1" ; fi - -rm -f /tmp/urfuct.txt /tmp/badpkg_us.txt /tmp/badpkg.txt +rm -f /tmp/_portage_reinstall_.txt /tmp/badpkg_us.txt /tmp/badpkg.txt for dir in /etc {/usr,}/{*bin,lib*}; do - fgrep -r _portage_reinstall_ $dir | fgrep -v doebuild >> /tmp/urfuct.txt & + fgrep -r _portage_reinstall_ $dir | fgrep -v doebuild >> /tmp/_portage_reinstall_.txt & WAITPIDS="$WAITPIDS "$! done wait $WAITPIDS -#fgrep -r _portage_reinstall_ /etc {/usr,}/{*bin,lib*} | fgrep -v doebuild > /tmp/urfuct.txt -#find /etc {/usr,}/{*bin,lib*} -type f | xargs -P ${CORES} fgrep '_portage_rebuild_' | fgrep -v doebuild > /tmp/urfuct.txt -if [ -n "$(cat /tmp/urfuct.txt)" ]; then - cat /tmp/urfuct.txt | cut -d":" -f1 > /tmp/badfiles.txt +if [ -n "$(cat /tmp/_portage_reinstall_.txt)" ]; then + cat /tmp/_portage_reinstall_.txt | cut -d":" -f1 > /tmp/badfiles.txt xargs -a /tmp/badfiles.txt qfile -S -C | cut -d' ' -f1 > /tmp/badpkg_us.txt sort -u /tmp/badpkg_us.txt | grep -v portage > /tmp/badpkg.txt if [ -n "$(cat /tmp/badpkg.txt)" ]; then emerge -1 --buildpkg=y --nodeps $(cat /tmp/badpkg.txt) fi - rm -f /tmp/urfuct.txt /tmp/badfiles.txt /tmp/badpkg_us.txt /tmp/badpkg.txt + rm -f /tmp/_portage_reinstall_.txt /tmp/badfiles.txt /tmp/badpkg_us.txt /tmp/badpkg.txt fi