Removed old echo functions and other old code, prepared 0.2 release

This commit is contained in:
Nico Schottelius 2006-01-13 23:10:23 +01:00
parent fdf9ba767e
commit e4cc3b319c
1 changed files with 4 additions and 18 deletions

View File

@ -2,7 +2,7 @@
# Nico Schottelius # Nico Schottelius
# written for SyGroup (www.sygroup.ch) # written for SyGroup (www.sygroup.ch)
# Date: Mon Nov 14 11:45:11 CET 2005 # Date: Mon Nov 14 11:45:11 CET 2005
# Last Modified: # Last Modified: (See ls -l or git)
# #
# where to find our configuration and temporary file # where to find our configuration and temporary file
@ -18,27 +18,13 @@ WE=$(basename $0)
# #
PARALLEL="" PARALLEL=""
# #
# catch signals # catch signals
# #
trap "rm -f \"$TMP\"" 1 2 15 trap "rm -f \"$TMP\"" 1 2 15
#
# output and errors
#
errecho()
{
# echo "[$name][err] $@" >> "$TMP" 2>&1
echo $@
}
stdecho()
{
echo $@
# echo "[$name] $@" >> "$TMP" 2>&1
}
add_name() add_name()
{ {
sed "s/^/\[$name\] /" sed "s/^/\[$name\] /"
@ -250,7 +236,7 @@ while [ "$i" -lt "$no_shares" ]; do
else else
source=$(cat "$c_source") source=$(cat "$c_source")
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
stdecho "Skipping: Source $c_source is not readable" echo "Skipping: Source $c_source is not readable"
exit 1 exit 1
fi fi
fi fi
@ -292,7 +278,7 @@ while [ "$i" -lt "$no_shares" ]; do
while read to_remove; do while read to_remove; do
dir="$to_remove" dir="$to_remove"
echo "Removing $dir ..." echo "Removing $dir ..."
rm -rf "$dir" 2>&1 | add_name rm -rf "$dir"
done < "$TMP" done < "$TMP"
fi fi