Files
evolution/tools/evolution-addressbook-clean.in
Dan Winship 8790e14c4b subst in $(toolsdir) instead of $(bindir)
* tools/Makefile.am: subst in $(toolsdir) instead of $(bindir)

        * tools/evolution-addressbook-clean.in:
        s/EVOLUTION_BINDIR/EVOLUTION_TOOLSDIR/

svn path=/trunk/; revision=19809
2003-02-06 16:45:55 +00:00

25 lines
564 B
Perl

#! /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");