ussg

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit 3a8870724a4c742bd1e6f62913e920b6a72da0c8
parent c2e1425fa73befe59439e64eb787c790da71f738
Author: Ellenor Bjornsdottir <Ellenor@Umbrellix.NET>
Date:   Wed, 31 Dec 2025 13:39:08 +0000

out of date

Diffstat:
Mussg-page | 17++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/ussg-page b/ussg-page @@ -340,14 +340,29 @@ if {[llength $arg] == 2} { # spend time to save time if {[file exists $::outputfile] && [file exists $::inputfile]} { + set ::canexit 1 if {[set outputmtime [file mtime $::outputfile]] >= [set inputmtime [file mtime $::inputfile]]} { puts stderr [format "Info: output file \'%s\' is newer (%s) than input file \'%s\' (%s)" $::outputfile $outputmtime $::inputfile $inputmtime] - exit 0 + foreach header $::headersfiles { + if {[set outputmtime [file mtime $::outputfile]] >= [set inputmtime [file mtime header]]} { + puts stderr [format "Info: output file \'%s\' is newer (%s) than header file \'%s\' (%s)" $::outputfile $outputmtime $::inputfile $inputmtime] + } else { + puts stderr [format "Info: output file \'%s\' was modified %s, header file \'%s\' was modified (%s)" $::outputfile $outputmtime $::inputfile $inputmtime] + set ::canexit 0 + } + } } { puts stderr [format "Info: output file \'%s\' was modified %s, input file \'%s\' was modified (%s)" $::outputfile $outputmtime $::inputfile $inputmtime] + set ::canexit 0 } } { puts stderr [format "Info: only one of the two files exists"] + set ::canexit 0 + } + if {$::canexit} { + puts stderr [format "Info: output file \'%s\' is considered up to date; exiting." $::outputfile]; exit + } else { + puts stderr [format "Info: output file \'%s\' is considered out of date; continuing." $::outputfile] } } { puts stderr [format "Info: quick mode disabled, or input file == -"]