File: evolution-addressbook-clean

package info (click to toggle)
evolution 2.6.3-6etch2
  • links: PTS
  • area: main
  • in suites: etch
  • size: 79,516 kB
  • ctags: 32,159
  • sloc: ansic: 295,007; xml: 10,755; sh: 9,373; makefile: 3,756; perl: 1,591
file content (24 lines) | stat: -rw-r--r-- 661 bytes parent folder | download | duplicates (2)
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 = `/home/kharish/opt/gnome/libexec/evolution/2.6/evolution-addressbook-export`;
if ($? != 0) {
    $! = $?;
    die $!;
}

$HOME = $ENV{"HOME"};

system ("/home/kharish/opt/gnome/libexec/evolution/2.6/killev");
do_system ("/bin/mv ${HOME}/.evolution/addressbook/local/system/addressbook.db ${HOME}/.evolution/addressbook/local/system/addressbook-backup.db");
do_system ("/home/kharish/opt/gnome/libexec/evolution/2.6/evolution-addressbook-import --input-file $filename");
do_system ("/bin/rm $filename");