diff options
author | Christopher James Lahey <clahey@ximian.com> | 2001-10-19 05:18:25 +0800 |
---|---|---|
committer | Chris Lahey <clahey@src.gnome.org> | 2001-10-19 05:18:25 +0800 |
commit | d4fd9c55c7f5d5b7ad3f0bf1c4a2481023f7bceb (patch) | |
tree | 0345248e002c380e1eff080933d05ca7353118d4 /tools/evolution-addressbook-clean.in | |
parent | 8589cb087050e616facdba00e79479868b08c07f (diff) | |
download | gsoc2013-evolution-d4fd9c55c7f5d5b7ad3f0bf1c4a2481023f7bceb.tar.gz gsoc2013-evolution-d4fd9c55c7f5d5b7ad3f0bf1c4a2481023f7bceb.tar.zst gsoc2013-evolution-d4fd9c55c7f5d5b7ad3f0bf1c4a2481023f7bceb.zip |
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
Diffstat (limited to 'tools/evolution-addressbook-clean.in')
-rw-r--r-- | tools/evolution-addressbook-clean.in | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tools/evolution-addressbook-clean.in b/tools/evolution-addressbook-clean.in new file mode 100644 index 0000000000..ec407296da --- /dev/null +++ b/tools/evolution-addressbook-clean.in @@ -0,0 +1,24 @@ +#! /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"); + |