summaryrefslogtreecommitdiffstats
path: root/scripts/lastsync.pl
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/lastsync.pl')
-rwxr-xr-xscripts/lastsync.pl7
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/lastsync.pl b/scripts/lastsync.pl
new file mode 100755
index 0000000..37bef03
--- /dev/null
+++ b/scripts/lastsync.pl
@@ -0,0 +1,7 @@
+#!/usr/bin/perl
+use Date::Manip;
+
+$date = `grep "Sync completed" /var/log/emerge.log | tail -n1 | cut -c-10`;
+$date = &DateCalc("Jan 1, 1970 00:00:00 GMT",$date);
+$date = UnixDate("$date","%A %H:%M");
+print "$date";