So, I was running into some problems w/ how livecheck works.
The information on https://guide.macports.org/#reference.livecheck isn't
that helpfull in understanding, what's going on, but my educated guess
is the following :

1) the livecheck.url is dowloaded
2) the list of files is filtered through the livecheck.regex
3) if a version# -gt than the current version# is found, it's reported

My 1st problem was understanding what livecheck.types actually exists,
so ...

find . -type f -name Portfile \
| xargs -n1 awk '/livecheck.type/{print $2}' \
| sort -u \
| xargs -n3 printf '%-26s%-26s%-26s\n'

freecode                  git                       gnome

gnome-with-unstable       gnu                       googlecode

md5                       moddate                   no

none                      pypi                      regex

regexm


🤔 I think that 'no' should be 'none'

But what's the mechanism behind them ?
Where can I find an in-depth tutorial on these mechanisms ?

The 🤓 in me tried to get an isight by running this :

declare -i i
while read -u 9 livecheckType
do
    i=0 ; echo -e "\n\n${livecheckType}"
    while read -u 8 portfile
    do
        [[ "$( awk '/livecheck.type/{print $2}' "${portfile}" )" \
           != "${livecheckType}" ]] && continue

        grep -H "livecheck." "${portfile}" \
        | sed -E -e 's!Portfile:! !'

        [[ $(( ++i )) -ge 5 ]] && break
    done 8< <( find . -type f -name Portfile )
done 9< <( find . -type f -name 'Portfile' \
         | xargs -n1 awk '/livecheck.type/{print $2}' \
         | sort -u ) \
| tee ../logs/livecheck.log

Hideously computaitonally expensive; and could be optimized to only run
through the Portfiles once ... by it gets the job done ... eventually 🤣🤔🤓

-- 
Bjarne D Mathiesen
Slagelse ; Danmark ; Europa
-----------------------------------------------------------------------
denne besked er skrevet i et totalt M$-frit miljø
MacPro 2010 5.1 ; OpenCore + macOS 15.7.1 Sequoia
2 x 3,46 GHz 6-Core Intel Xeon ; 192 GB 1333 MHz DDR3 ECC RDIMM
ATI Radeon RX 590 8 GB

Reply via email to