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
commit 81df2e5a21
3 changed files with 26 additions and 4 deletions

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