From 8182442be7a7baca39cf2d0acae84407e8768ae4 Mon Sep 17 00:00:00 2001 From: Carl N Baldwin Date: Thu, 13 Oct 2005 22:25:41 -0600 Subject: [PATCH] A good start. --- Makefile.am | 10 ++++++++++ config.h.in | 22 ++++++++++++++++++++++ configure.ac | 15 +++++++++++++++ find-cmd.sh | 2 +- main.cc | 17 +++++++++++++++++ 5 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 Makefile.am create mode 100644 config.h.in create mode 100644 configure.ac create mode 100644 main.cc diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..d4632fe --- /dev/null +++ b/Makefile.am @@ -0,0 +1,10 @@ +bin_PROGRAMS = lsbackups + +bin_SCRIPTS = find-cmd.sh + +EXTRA_DIST = $(bin_SCRIPTS) + +lsbackups_SOURCES = main.cc + +AM_CPPFLAGS = $(SQLITE3_CFLAGS) +LDADD = $(SQLITE3_LIBS) diff --git a/config.h.in b/config.h.in new file mode 100644 index 0000000..c364eda --- /dev/null +++ b/config.h.in @@ -0,0 +1,22 @@ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Name of package */ +#undef PACKAGE + +/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT + +/* Define to the full name of this package. */ +#undef PACKAGE_NAME + +/* Define to the full name and version of this package. */ +#undef PACKAGE_STRING + +/* Define to the one symbol short name of this package. */ +#undef PACKAGE_TARNAME + +/* Define to the version of this package. */ +#undef PACKAGE_VERSION + +/* Version number of package */ +#undef VERSION diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..af47932 --- /dev/null +++ b/configure.ac @@ -0,0 +1,15 @@ +AC_INIT([inc-backups], 0.1) +AC_CONFIG_HEADERS([config.h]) +AC_COPYRIGHT([(c) Carl Baldwin. All Rights Reserved. ]) + +AM_INIT_AUTOMAKE([foreign -Wall]) + +PKG_CHECK_MODULES([SQLITE3], [sqlite3]) + +AC_PROG_CXX() +AC_PROG_INSTALL() +AC_PROG_RANLIB() + +AC_CONFIG_FILES( [Makefile] ) + +AC_OUTPUT diff --git a/find-cmd.sh b/find-cmd.sh index e0f812b..14180f8 100755 --- a/find-cmd.sh +++ b/find-cmd.sh @@ -1,5 +1,5 @@ #!/bin/sh -time find /server/home \ +time find . \ \( -type d -o -type f -o -type l \) \ -printf "%y %#m %g %u %s %CDT%CT %p\0" > list diff --git a/main.cc b/main.cc new file mode 100644 index 0000000..bd744b6 --- /dev/null +++ b/main.cc @@ -0,0 +1,17 @@ +#include +#include + +using namespace std; + +int main() { + string file_string; + do { + file_string.clear(); + for( int c = cin.get(); 0 != c && ! cin.eof(); c = cin.get() ) { + file_string.push_back( c ); + } + if( 0 != file_string.size() ) { + cout << file_string << endl; + } + } while( ! cin.eof() ); +} -- 2.34.1