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 . user\@host:/path/to/docroot/",
23 description => "command to run to sync updated pages",
30 if (! exists $config{rsync_command} ||
31 ! defined $config{rsync_command}) {
32 error("Must specify rsync_command");
37 chdir($config{destdir}) || error("chdir: $!");
38 system $config{rsync_command};
40 error("failed to execute rsync_command: $!");
42 error(sprintf("rsync_command exited %d", $? >> 8));