2 package IkiWiki::Plugin::rsync;
9 hook(type => "getsetup", id => "rsync", call => \&getsetup);
10 hook(type => "checkconfig", id => "rsync", call => \&checkconfig);
11 hook(type => "postrefresh", id => "rsync", call => \&postrefresh);
22 example => "rsync -qa --delete /path/to/destdir/ user\@host:/path/to/docroot/",
23 description => "unattended command to upload regenerated pages",
30 if (! exists $config{rsync_command} ||
31 ! defined $config{rsync_command}) {
32 error("Must specify rsync_command");
37 system $config{rsync_command};
39 error("failed to execute rsync_command: $!");
41 error(sprintf("rsync_command exited %d", $? >> 8));