2 package IkiWiki::Plugin::rsync;
9 hook(type => "getsetup", id => "rsync", call => \&getsetup);
10 hook(type => "change", id => "rsync", call => \&postrefresh);
11 hook(type => "delete", id => "rsync", call => \&postrefresh);
19 section => "special-purpose",
23 example => "rsync -qa --delete . user\@host:/path/to/docroot/",
24 description => "command to run to sync updated pages",
33 if (defined $config{rsync_command} && ! $ran) {
35 chdir($config{destdir}) || error("chdir: $!");
36 system $config{rsync_command};
38 warn(sprintf(gettext("failed to execute rsync_command: %s"), $!))."\n";
41 warn(sprintf(gettext("rsync_command exited %d"), $? >> 8))."\n";