blob: b7ee7ba167ea6694d28be531b9a60ed7fc77346f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#! /usr/bin/perl -w
sub do_system
{
my ($command) = @_;
system ($command);
if ($? != 0) {
die "Command failed: $command";
}
}
$filename = `@EVOLUTION_TOOLSDIR@/evolution-addressbook-export`;
if ($? != 0) {
$! = $?;
die $!;
}
$HOME = $ENV{"HOME"};
system ("@EVOLUTION_TOOLSDIR@/killev");
do_system ("/bin/mv ${HOME}/evolution/local/Contacts/addressbook.db ${HOME}/evolution/local/Contacts/addressbook-backup.db");
do_system ("@EVOLUTION_TOOLSDIR@/evolution-addressbook-import --input-file $filename");
do_system ("/bin/rm $filename");
|