Files
evolution/tools/evolution-addressbook-clean.in
Christopher James Lahey d4fd9c55c7 Bumped the required version of gal to 0.15.99.1 for use in
2001-10-18  Christopher James Lahey  <clahey@ximian.com>

	* configure.in: Bumped the required version of gal to 0.15.99.1
	for use in evolution-addressbook-export.

	* tools/.cvsignore: Added evolution-addressbook-clean,
	evolution-addressbook-export, evolution-addressbook-import, and
	.libs.

	* tools/Makefile.am: Added evolution-addressbook-clean,
	evolution-addressbook-export, and evolution-addressbook-import.

	* tools/evolution-addressbook-clean.in: Main script to clean up
	the local contact database.

	* tools/evolution-addressbook-export.c: Exports the local
	addressbook to the specified file
	(--output-file).  If no --output-file is given, writes out to a
	unique file in the /tmp directory.  In either case, prints the
	filename to stdout.

	* tools/evolution-addressbook-import.c: Imports the specified file
	(--input-file) to the local addressbook.

svn path=/trunk/; revision=13774
2001-10-18 21:18:25 +00:00

25 lines
558 B
Perl

#! /usr/bin/perl -w
sub do_system
{
my ($command) = @_;
system ($command);
if ($? != 0) {
die "Command failed: $command";
}
}
$filename = `@EVOLUTION_BINDIR@/evolution-addressbook-export`;
if ($? != 0) {
$! = $?;
die $!;
}
$HOME = $ENV{"HOME"};
system ("@EVOLUTION_BINDIR@/killev");
do_system ("/bin/mv ${HOME}/evolution/local/Contacts/addressbook.db ${HOME}/evolution/local/Contacts/addressbook-backup.db");
do_system ("@EVOLUTION_BINDIR@/evolution-addressbook-import --input-file $filename");
do_system ("/bin/rm $filename");