commit:     7ebdd7c8577d15d7ddb31cd1cdc49d0fe715ad27
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 24 09:09:15 2024 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Sat Feb 24 09:10:36 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=7ebdd7c8

scripts/auto-bootstraps/process_uploads: add local processing hook

log cleansing and distfile caching/processing is specific to the local
setup, allow to hook it in

Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>

 scripts/auto-bootstraps/process_uploads.sh | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)

diff --git a/scripts/auto-bootstraps/process_uploads.sh 
b/scripts/auto-bootstraps/process_uploads.sh
index ca39789510..dc858589a8 100755
--- a/scripts/auto-bootstraps/process_uploads.sh
+++ b/scripts/auto-bootstraps/process_uploads.sh
@@ -3,6 +3,16 @@
 UPLOADDIR="./uploads"
 RESULTSDIR="./results"
 
+if [[ -x ${BASH_SOURCE[0]%/*}/process_uploads_local.sh ]] ; then
+       source ${BASH_SOURCE[0]%/*}/process_uploads_local.sh
+fi
+
+if [[ $(type -t process_file) != function ]] ; then
+       process_file() {
+               return
+       }
+fi
+
 didsomething=
 for d in ${UPLOADDIR}/* ; do
        if [[ ! -d "${d}" ]] ; then
@@ -30,17 +40,19 @@ for d in ${UPLOADDIR}/* ; do
        # behind
        mkdir "${RESULTSDIR}/${dir}"
        for f in \
+               distfiles \
                stage{1,2,3}.log \
                .stage{1,2,3}-finished \
                bootstrap-prefix.sh \
                emerge.log \
                startprefix \
                elapsedtime \
-               make.conf \
-               distfiles ;
+               make.conf ;
        do
-               [[ -e "${d}/${dir}/${f}" ]] && \
+               if [[ -e "${d}/${dir}/${f}" ]] ; then
                        mv "${d}/${dir}/${f}" "${RESULTSDIR}/${dir}"/
+                       process_file "${RESULTSDIR}/${dir}/${f}"
+               fi
        done
        if [[ -e "${d}/${dir}/portage" ]] ; then
                for pkg in "${d}/${dir}/portage"/*/* ; do

Reply via email to