]> git.ipfire.org Git - thirdparty/snapper.git/commitdiff
- removed obsolete compare-dirs tool
authorArvin Schnell <aschnell@suse.de>
Fri, 7 Sep 2012 12:38:48 +0000 (14:38 +0200)
committerArvin Schnell <aschnell@suse.de>
Fri, 7 Sep 2012 12:38:48 +0000 (14:38 +0200)
Makefile.am
configure.in
snapper.spec.in
snapper/AppUtil.cc
snapper/AppUtil.h
tools/.gitignore [deleted file]
tools/Makefile.am [deleted file]
tools/compare-dirs.cc [deleted file]

index a6cae224de9f9b2d20c652ecd279d2ab10d5554f..2a2244a4c234ebe9880b6a10d052e0198f513bd7 100644 (file)
@@ -2,7 +2,7 @@
 # Makefile.am for snapper
 #
 
-SUBDIRS = snapper examples tools dbus server client scripts data doc po testsuite-real bindings
+SUBDIRS = snapper examples dbus server client scripts data doc po testsuite-real bindings
 
 AUTOMAKE_OPTIONS = foreign dist-bzip2 no-dist-gzip
 
index 1d4e1a3834c742ceabb8e3a4a583dd79cbace9e9..bbdf04e729410a7b85a4f4a58c701082a2a90744 100644 (file)
@@ -71,7 +71,6 @@ AC_OUTPUT(
        examples/Makefile
        bindings/Makefile
        bindings/python/Makefile
-       tools/Makefile
        dbus/Makefile
        server/Makefile
        client/Makefile
index c54eab5505a2c2ebc5fe848f655cd1b82c520db6..10e8a4a2ab3dc80237438d33081b3556e597bf59 100644 (file)
@@ -121,9 +121,6 @@ Authors:
 %else
 %config(noreplace) %{_sysconfdir}/sysconfig/snapper
 %endif
-%dir %{_libdir}/snapper
-%dir %{_libdir}/snapper/bin
-%{_libdir}/snapper/bin/compare-dirs
 
 %post -n libsnapper@LIBVERSION_MAJOR@
 /sbin/ldconfig
index 5874d4f9b144d10fb091cf137535e715c6cc6e2b..792cec8cebdc7add31abc2a3e68f75be25b8d05d 100644 (file)
@@ -88,22 +88,6 @@ namespace snapper
     }
 
 
-    FILE*
-    mkstemp(string& path)
-    {
-       char* tmp = strdup(path.c_str());
-
-       int fd = ::mkstemp(tmp);
-       if (fd == -1)
-           return NULL;
-
-       path = tmp;
-       free(tmp);
-
-       return fdopen(fd, "w");
-    }
-
-
     bool
     clonefile(int src_fd, int dest_fd)
     {
index f9cee595b14220587b93d357e6bca30bf13e541c..e9a88b44c59cad34de543c249ea232e3ffc0b136 100644 (file)
@@ -47,8 +47,6 @@ namespace snapper
 
     list<string> glob(const string& path, int flags);
 
-    FILE* mkstemp(string& path);
-
     bool clonefile(int src_fd, int dest_fd);
     bool copyfile(int src_fd, int dest_fd);
 
diff --git a/tools/.gitignore b/tools/.gitignore
deleted file mode 100644 (file)
index bbbb2da..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-compare-dirs.o
-compare-dirs
diff --git a/tools/Makefile.am b/tools/Makefile.am
deleted file mode 100644 (file)
index a27b87d..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#
-# Makefile.am for snapper/tools
-#
-
-INCLUDES = -I$(top_srcdir)
-
-
-toolsbindir = $(libdir)/snapper/bin
-
-toolsbin_PROGRAMS = compare-dirs
-
-compare_dirs_SOURCES = compare-dirs.cc
-compare_dirs_LDADD = ../snapper/libsnapper.la -lboost_thread-mt
-
diff --git a/tools/compare-dirs.cc b/tools/compare-dirs.cc
deleted file mode 100644 (file)
index 9df110e..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-
-#include <stdlib.h>
-#include <signal.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <string.h>
-
-#include <snapper/Log.h>
-#include <snapper/AppUtil.h>
-#include <snapper/Compare.h>
-#include <snapper/File.h>
-
-using namespace snapper;
-using namespace std;
-
-
-string tmp_name;
-
-FILE* file = NULL;
-
-
-void
-terminate(int)
-{
-    if (file != NULL)
-       fclose(file);
-
-    if (!tmp_name.empty())
-       unlink(tmp_name.c_str());
-
-    exit(EXIT_FAILURE);
-}
-
-
-void
-write_line(const string& name, unsigned int status)
-{
-    fprintf(file, "%s %s\n", statusToString(status).c_str(), name.c_str());
-}
-
-
-int
-main(int argc, char** argv)
-{
-    if (argc != 4)
-    {
-       fprintf(stderr, "usage: compare-dirs path1 path2 output\n");
-       exit(EXIT_FAILURE);
-    }
-
-    daemon(0, 0);
-
-    initDefaultLogger();
-
-    string path1 = argv[1];
-    string path2 = argv[2];
-    string output = argv[3];
-
-    y2mil("compare-dirs path:" << path1 << " path2:" << path2 << " output:" << output);
-
-    struct sigaction act;
-    act.sa_handler = terminate;
-    sigemptyset(&act.sa_mask);
-    act.sa_flags = 0;
-
-    sigaction(SIGINT, &act, NULL);
-    sigaction(SIGTERM, &act, NULL);
-
-    tmp_name = output + ".tmp-XXXXXX";
-
-    file = mkstemp(tmp_name);
-
-    cmpDirs(SDir(path1), SDir(path2), write_line);
-
-    fclose(file);
-
-    rename(tmp_name.c_str(), output.c_str());
-
-    exit(EXIT_SUCCESS);
-}