www-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: www/proprietary/workshop malgen


From: Brett Gilio
Subject: Re: www/proprietary/workshop malgen
Date: Fri, 23 Oct 2020 12:29:34 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)

godef.th@free.fr (Therese Godefroy) writes:

> CVSROOT:      /webcvs/www
> Module name:  www
> Changes by:   Therese Godefroy <th_g> 20/10/23 11:01:14
>
> Modified files:
>       proprietary/workshop: malgen 
>
> Log message:
>       Check for non-existent targets; skip proprietary-menu.html.
>
> CVSWeb URLs:
> http://web.cvs.savannah.gnu.org/viewcvs/www/proprietary/workshop/malgen?cvsroot=www&r1=1.7&r2=1.8
>
> Patches:
>
> Index: malgen
> ===================================================================
> RCS file: /webcvs/www/www/proprietary/workshop/malgen,v
> retrieving revision 1.7
> retrieving revision 1.8
> diff -u -b -r1.7 -r1.8
> --- malgen    11 Jun 2019 11:36:06 -0000      1.7
> +++ malgen    23 Oct 2020 15:01:13 -0000      1.8
> @@ -122,11 +122,27 @@
>  
>  echo "x$input" | sed '1s,.,,' | while read f; do
>    out="../$f"
> + if [ "$f" != 'proprietary-menu.html' ]; then
>    echo "Regenerating '$f'"
>    # List all possible targets.
>    targets=$(awk 'BEGIN { RS = ""; FS="\nTargets: " }'"
>                   /^Page: ${f//./[.]}\n/"'{$1=""; print $0}' targets.rec)
>  
> +  # Check that mal.rec only lists real targets.
> +  wrong_targets=$(grep "Target:[ \t]*${f//./[.]}" mal.rec | 
> +    sed -e 's,[ \t]*$,,' -e 's,^.*html[ \t]*,,' | sort | uniq |
> +    while read t; do
> +    if ! echo " $targets " | grep -q " $t " ; then
> +      echo "    * $f $t"
> +    fi
> +  done)
> +  if [ -n "$wrong_targets" ]; then
> +    echo 1>&2 "!!! Incomplete regeneration - These targets don't exist:
> +$wrong_targets
> +    If one of these is a new target, add an empty blurb list with
> +    proper id to the relevant page, then run malgen again."
> +    exit 1
> +  fi
>    for t in $targets; do
>      if [ "$f" != 'proprietary.html' ]; then
>  
> @@ -162,6 +178,7 @@
>        insert_list
>      fi
>    done # for t in $targets
> + fi
>  done # for f in $input
>  
>  ./update-item-count
>

A much needed patch, thank you!

-- 
Brett M. Gilio
brettg@gnu.org
https://brettgilio.com/
GNU Project webmaster [https://gnu.org/help/]
E82A C026 95D6 FF02 43CA 1E5C F6C5 2DD1 BA27 CB87



reply via email to

[Prev in Thread] Current Thread [Next in Thread]