From: PHO Date: Sun, 7 Dec 2008 12:16:59 +0000 (+0900) Subject: Auto commit by The Sugar System. X-Git-Url: http://git.cielonegro.org/gitweb.cgi?p=sugar.git;a=commitdiff_plain;h=84a90e22907dfbf662a42a1fa1c6bb0c054fa02d Auto commit by The Sugar System. --- diff --git a/GNUmakefile b/GNUmakefile index bf199c4..d79d0fa 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -7,5 +7,11 @@ update: git pull perl ./tools/list-files.pl | perl ./tools/update.pl perl ./tools/list-files.pl | perl ./tools/find-outdated.pl + git status + +commit: + git add -A + git commit -m 'Auto commit by The Sugar System.' + git push .PHONY: lint \ No newline at end of file diff --git a/dot-files/_zshrc b/dot-files/_zshrc index b6d2207..85bdc4b 100644 --- a/dot-files/_zshrc +++ b/dot-files/_zshrc @@ -33,7 +33,6 @@ setopt auto_remove_slash setopt c_bases setopt chase_links setopt complete_aliases -# setopt correct_all setopt correct setopt equals setopt glob_complete diff --git a/tools/update.pl b/tools/update.pl index d91e35a..624b3eb 100644 --- a/tools/update.pl +++ b/tools/update.pl @@ -16,7 +16,14 @@ sub main { my $abs = File::Spec->rel2abs($rel, $ENV{HOME}); - copy($abs, $saved) or die $!; + my $current_st = stat($abs); + my $saved_st = stat($saved); + + if ($current_st->mtime > $saved_st->mtime && + compare($abs, $saved) != 0) { + print "Copying $abs to $saved...\n"; + copy($abs, $saved) or die $!; + } } }