aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/tools/evolution-addressbook-clean.in
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2003-10-22 02:49:34 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2003-10-22 02:49:34 +0800
commit653cfffc0e00dfb59b36813c1b45c53d3f773c65 (patch)
tree9b486d5e383ec1391d60973d9cc548be0ef6d9d5 /addressbook/tools/evolution-addressbook-clean.in
parent0fb08f3ff81575a4749d851404233f34252dd2f2 (diff)
downloadgsoc2013-evolution-653cfffc0e00dfb59b36813c1b45c53d3f773c65.tar
gsoc2013-evolution-653cfffc0e00dfb59b36813c1b45c53d3f773c65.tar.gz
gsoc2013-evolution-653cfffc0e00dfb59b36813c1b45c53d3f773c65.tar.bz2
gsoc2013-evolution-653cfffc0e00dfb59b36813c1b45c53d3f773c65.tar.lz
gsoc2013-evolution-653cfffc0e00dfb59b36813c1b45c53d3f773c65.tar.xz
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.in24
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");
+