git add -A
git commit -m 'Auto commit by The Sugar System.'
git push
+ git log --stat --unified -1 --color
-.PHONY: lint
\ No newline at end of file
+install: lint
+ perl ./tools/list-files.pl | perl ./tools/install.pl
+
+.PHONY: lint update commit install
--- /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});
+
+ my $current_st = stat($abs);
+ my $saved_st = stat($saved);
+
+ if ($current_st->mtime < $saved_st->mtime &&
+ compare($abs, $saved) != 0) {
+ print "Copying $saved to $abs...\n";
+ unlink $abs or die $!;
+ copy($saved, $abs) or die $!;
+ }
+ }
+}
+
+main();