Fix for ccollect 0.4 fixup scripts

Now using two temp-files in fixup scripts.

And reversed moving of directories.
This commit is contained in:
Nico Schottelius 2006-04-27 10:42:16 +02:00
parent 83e8262e47
commit 81df2e5a21
3 changed files with 26 additions and 4 deletions

View file

@ -1,7 +1,7 @@
ccollect - Installing, Configuring and Using
============================================
Nico Schottelius <nico-linux-ccollect__@__schottelius.org>
0.3.3, for ccollect 0.3.2-0.3.3, Initial Version from 2006-01-13
0.4.0, for ccollect 0.4, Initial Version from 2006-01-13
:Author Initials: NS
(pseudo) incremental backup
@ -50,6 +50,13 @@ versions:
- ccollect will now exit, when preexec returns non-zero
- ccollect now reports when postexec returns non-zero
You can convert your old configuration directory using
`config-pre-0.4-to-0.4.sh`, which can be found in the *tools/*
subdirectory:
--------------------------------------------------------------------------------
[10:05] hydrogenium:ccollect-0.4# ./tools/config-pre-0.4-to-0.4.sh /etc/ccollect
--------------------------------------------------------------------------------
Requirements

View file

@ -11,8 +11,20 @@ if [ $# -ne 1 ]; then
exit 23
fi
tmp=$(mktemp)
tmp2=$(mktemp)
script=$(echo $0 | sed 's/\.sh/.sub.sh/')
find "$1" -type d -name intervalls -exec "$script" {} \;
find "$1" -type d -name intervalls > "$tmp"
#
# reverse found data, so deepest directories are renamed first
#
tac "$tmp" > "$tmp2"
while read intervals
do
"$script" "$intervals"
done < "$tmp2"
rm -f "$tmp" "$tmp2"

View file

@ -6,8 +6,11 @@
master=$(echo $0 | sed 's/\.sub//')
if [ $# -ne 1 ]; then
echo "$0: DO NOT CALL ME DIRECTLY"
echo "$master calls me for moving"
echo "$0:"
echo ""
echo " DO NOT CALL ME DIRECTLY"
echo ""
echo "Use $master, please."
exit 23
fi