use strict; use warnings; use Smart::Comments; use lib 'tools'; require 'utils.pl'; use File::stat; use File::Spec; use File::Compare; sub main { my $found_updated; while (defined(my $rel = <>)) { chomp $rel; my $saved = rel2saved($rel); next if !-e $saved; my $abs = File::Spec->rel2abs($rel, $ENV{HOME}); my $current_st = stat($abs); my $saved_st = stat($saved); if ($current_st->mtime > $saved_st->mtime && compare($abs, $saved) != 0) { print "M $rel\n"; } } if ($found_updated) { exit 1; } } main();