diff options
author | Ettore Perazzoli <ettore@src.gnome.org> | 2003-10-22 02:49:34 +0800 |
---|---|---|
committer | Ettore Perazzoli <ettore@src.gnome.org> | 2003-10-22 02:49:34 +0800 |
commit | 653cfffc0e00dfb59b36813c1b45c53d3f773c65 (patch) | |
tree | 9b486d5e383ec1391d60973d9cc548be0ef6d9d5 /addressbook/tools/evolution-addressbook-clean.in | |
parent | 0fb08f3ff81575a4749d851404233f34252dd2f2 (diff) | |
download | gsoc2013-evolution-653cfffc0e00dfb59b36813c1b45c53d3f773c65.tar.gz gsoc2013-evolution-653cfffc0e00dfb59b36813c1b45c53d3f773c65.tar.zst gsoc2013-evolution-653cfffc0e00dfb59b36813c1b45c53d3f773c65.zip |
Merge new-ui-branch to the trunk.
svn path=/trunk/; revision=22965
Diffstat (limited to 'addressbook/tools/evolution-addressbook-clean.in')
-rw-r--r-- | addressbook/tools/evolution-addressbook-clean.in | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/addressbook/tools/evolution-addressbook-clean.in b/addressbook/tools/evolution-addressbook-clean.in new file mode 100644 index 0000000000..b7ee7ba167 --- /dev/null +++ b/addressbook/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_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"); + |