From: Carl N Baldwin <cnb@hpsvcnb.fc.hp.com>
Date: Thu, 20 Oct 2005 15:48:14 +0000 (-0600)
Subject: Reorganize a bit
X-Git-Tag: release-0.4~92
X-Git-Url: http://git.pippins.net/%27%20.%20%24this-%3Ephpgw_js_url%20.%20%27/jscalendar/static/images/%7Bnolink%7D?a=commitdiff_plain;h=f5d92011429ec87196013fe7aef0ff4754a8088d;p=backups%2F.git

Reorganize a bit
---

diff --git a/Makefile.am b/Makefile.am
index 30391e1..bd1b3e8 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,3 +1,5 @@
+SUBDIRS = scripts
+
 bin_PROGRAMS = lsbackups
 
 bin_SCRIPTS = find-cmd.sh
diff --git a/configure.ac b/configure.ac
index 3c21c10..a41026e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,5 +9,6 @@ AC_PROG_INSTALL()
 AC_PROG_RANLIB()
 
 AC_CONFIG_FILES( [Makefile] )
+AC_CONFIG_FILES( [scripts/Makefile] )
 
 AC_OUTPUT
diff --git a/find-cmd.sh b/find-cmd.sh
deleted file mode 100755
index 964dd15..0000000
--- a/find-cmd.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh
-
-{
-  for type in d f l; do
-    find . -type $type -printf "$type %#m %u %g %s %CY%Cm%Cd%CH%CM%CS 0 %p\0"
-  done
-}
diff --git a/rsync-cmd.sh b/rsync-cmd.sh
deleted file mode 100755
index 2ee3682..0000000
--- a/rsync-cmd.sh
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/sh
-
-# This file just has some ideas about how to do the rsync command with the list
-# of file produced by lsbackups
-
-# -H ? -W ?
-rsync_opts='-W -H -l -p -t -g -o -0 --files-from=-'
-
-other_opts='--stats --progress'
-
-# This would something like be /home
-srcdir=~/test/a
-
-# This would be something like /mnt/dvdisoimage
-dstdir=~/destdir
-
-# # For directories  ( Do I even need this?  I don't think so. )
-# find $srcdir -type d -print0 | # this just produces an example null-delimited list.
-#   rsync -d $rsync_opts $other_opts / $dstdir
-
-# Should also include directories in there
-find $srcdir \( -type f -o -type l -o -type d \) -print0 | # this just produces an example null-delimited list.
-  rsync $rsync_opts $other_opts / $dstdir
-
diff --git a/scripts/Makefile.am b/scripts/Makefile.am
new file mode 100644
index 0000000..95e619c
--- /dev/null
+++ b/scripts/Makefile.am
@@ -0,0 +1,5 @@
+EXTRA_DIST= \
+  find-cmd.sh \
+  list-dates.rb \
+  other-commands \
+  rsync-cmd.sh
diff --git a/scripts/find-cmd.sh b/scripts/find-cmd.sh
new file mode 100755
index 0000000..964dd15
--- /dev/null
+++ b/scripts/find-cmd.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+{
+  for type in d f l; do
+    find . -type $type -printf "$type %#m %u %g %s %CY%Cm%Cd%CH%CM%CS 0 %p\0"
+  done
+}
diff --git a/scripts/other-commands b/scripts/other-commands
new file mode 100644
index 0000000..73f3468
--- /dev/null
+++ b/scripts/other-commands
@@ -0,0 +1,13 @@
+# Handling null-delimited files with...
+
+# xargs
+xargs -0
+
+# grep
+grep [-z|--null-data]
+
+# sed
+# Can't figure this one out
+
+# awk
+awk 'BEGIN { RS="\0" } {print...}'
diff --git a/scripts/rsync-cmd.sh b/scripts/rsync-cmd.sh
new file mode 100755
index 0000000..2ee3682
--- /dev/null
+++ b/scripts/rsync-cmd.sh
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+# This file just has some ideas about how to do the rsync command with the list
+# of file produced by lsbackups
+
+# -H ? -W ?
+rsync_opts='-W -H -l -p -t -g -o -0 --files-from=-'
+
+other_opts='--stats --progress'
+
+# This would something like be /home
+srcdir=~/test/a
+
+# This would be something like /mnt/dvdisoimage
+dstdir=~/destdir
+
+# # For directories  ( Do I even need this?  I don't think so. )
+# find $srcdir -type d -print0 | # this just produces an example null-delimited list.
+#   rsync -d $rsync_opts $other_opts / $dstdir
+
+# Should also include directories in there
+find $srcdir \( -type f -o -type l -o -type d \) -print0 | # this just produces an example null-delimited list.
+  rsync $rsync_opts $other_opts / $dstdir
+