NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
Various improvements (Score:1)
Unlike sh, bash has arithmetic evaluation that would make your script much simpler. I also wouldn’t check for the dotfile’s existence, just read it with error messages suppressed. It’s also bizarre that you’re using
date +%sto get the timestamp in one place andperl -e 'print time'in another – and the backticks around that second place are even more so. All in all here’s how I’d write that:Re:Various improvements (Score:2)
By the way, I did implement many of your suggestions, thank you. However, I deliberately didn't want to go with the 'don't run tests if there are no updates to CVS'. There are plenty of other ways -- admittedly less common -- that tests can fail even without CVS updates. When those failures occur, I'd like to catch them!
Reply to This
Parent
Re: (Score:1)
Ah. Btw, a much more direct way to do this just occured to me: use the file’s mtime.
The idiomatic bit here is using
findto check the file’s age. The-mmin +5predicate means “if the mtime of the file under considerat