#!/usr/bin/perl use strict; use FindBin qw($Bin); use constant DEBUG => 0; chdir $Bin; my $svnUp = `svn up "$Bin"`; warn $svnUp if DEBUG; my $buildCmd = "\"$Bin/buildrepo.pl\""; # Unfortunately Perl 5.18 introduced changes to the hash handling which would change the file's structure. # Try to use an older version if possible. This is mostly to simplify my needs on OSX. if ( $] > 5.016 && -f '/usr/bin/perl5.16' ) { $buildCmd = "/usr/bin/perl5.16 '$buildCmd'"; } warn $buildCmd if DEBUG; my $build = `$buildCmd`; warn $build if DEBUG; my $diff = `svn diff "$Bin"`; if ($diff) { if ( $^O =~ /darwin/i ) { `osascript -e 'display notification "Plugin updates are available. Please bump the repository file." with title "Plugin Update"'` } print "$diff\n\n"; } while ($build =~ /(.*error.*)/gm) { print "$1\n"; } print "\n"; 1;