]> gitweb @ CieloNegro.org - sugar.git/blobdiff - tools/update.pl
update.pl
[sugar.git] / tools / update.pl
diff --git a/tools/update.pl b/tools/update.pl
new file mode 100644 (file)
index 0000000..d91e35a
--- /dev/null
@@ -0,0 +1,23 @@
+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();