From: Carl N Baldwin Date: Fri, 14 Oct 2005 04:25:41 +0000 (-0600) Subject: A good start. X-Git-Tag: release-0.4~113 X-Git-Url: http://git.pippins.net/embedvideo/.git/%7Bnolink%7D?a=commitdiff_plain;h=8182442be7a7baca39cf2d0acae84407e8768ae4;p=backups%2F.git A good start. --- 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() ); +}