lint:
- @perl ./tools/list-files.pl | perl ./tools/find-missing.pl
- @perl ./tools/list-files.pl | perl ./tools/find-outdated.pl
- @perl ./tools/list-files.pl | perl ./tools/find-changed.pl
+ perl ./tools/list-files.pl | perl ./tools/find-missing.pl
+ perl ./tools/list-files.pl | perl ./tools/find-outdated.pl
+ perl ./tools/list-files.pl | perl ./tools/find-changed.pl
+
+update:
+ git pull
+ perl ./tools/list-files.pl | perl ./tools/update.pl
+ perl ./tools/list-files.pl | perl ./tools/find-outdated.pl
.PHONY: lint
\ No newline at end of file
--- /dev/null
+use strict;
+use warnings;
+use Smart::Comments;
+use lib 'tools';
+require 'utils.pl';
+use File::stat;
+use File::Spec;
+use File::Compare;
+use File::Copy;
+
+sub main {
+ while (defined(my $rel = <>)) {
+ chomp $rel;
+ my $saved = rel2saved($rel);
+ next if !-e $saved;
+
+ my $abs = File::Spec->rel2abs($rel, $ENV{HOME});
+
+ copy($abs, $saved) or die $!;
+ }
+}
+
+main();