# License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
# ensure mbsync and offlineimap compatibility
use strict;
use v5.10.1;
use File::Path qw(mkpath);
use PublicInbox::TestCommon;
# License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
# ensure mbsync and offlineimap compatibility
use strict;
use v5.10.1;
use File::Path qw(mkpath);
use PublicInbox::TestCommon;
require_mods(qw(-imapd));
my $inboxdir = $ENV{GIANT_INBOX_DIR};
(defined($inboxdir) && -d $inboxdir) or
require_mods(qw(-imapd));
my $inboxdir = $ENV{GIANT_INBOX_DIR};
(defined($inboxdir) && -d $inboxdir) or
- my $oimap = which('offlineimap') or skip 'no offlineimap(1)', 1;
+ my $oimap = require_cmd('offlineimap', 1) or
+ skip 'no offlineimap(1)', 1;
open my $fh, '>', "$tmpdir/.offlineimaprc" or BAIL_OUT "open: $!";
print $fh <<EOF or BAIL_OUT "print: $!";
[general]
open my $fh, '>', "$tmpdir/.offlineimaprc" or BAIL_OUT "open: $!";
print $fh <<EOF or BAIL_OUT "print: $!";
[general]
open my $fh, '>', "$tmpdir/.mbsyncrc" or BAIL_OUT "open: $!";
print $fh <<EOF or BAIL_OUT "print: $!";
Create Slave
open my $fh, '>', "$tmpdir/.mbsyncrc" or BAIL_OUT "open: $!";
print $fh <<EOF or BAIL_OUT "print: $!";
Create Slave