8ef838 compute-PATCHVERSION: Do not produce output when awk fails

Authored and Committed by Michal Suchanek 2 months ago
    compute-PATCHVERSION: Do not produce output when awk fails
    
    compute-PATCHVERSION uses awk to produce a shell script that is
    subsequently executed to update shell variables which are then printed
    as the patchversion.
    
    Some versions of awk, most notably bysybox-gawk do not understand the
    awk program and fail to run. This results in no script generated as
    output, and printing the initial values of the shell variables as
    the patchversion.
    
    When the awk program fails to run produce 'exit 1' as the shell script
    to run instead. That prevents printing the stale values, generates no
    output, and generates invalid rpm spec file down the line. Then the
    problem is flagged early and should be easier to diagnose.
    
        
file modified
+2 -2