[cosmetic] Changed share to source

This commit is contained in:
Nico Schottelius 2006-04-29 12:58:57 +02:00
parent d327a1bf64
commit 80e98e76bf

View file

@ -15,7 +15,7 @@ CPOSTEXEC="$CDEFAULTS/post_exec"
TMP=$(mktemp /tmp/$(basename $0).XXXXXX) TMP=$(mktemp /tmp/$(basename $0).XXXXXX)
VERSION=0.4 VERSION=0.4
RELEASE="2006-XX-XX" RELEASE="2006-04-29"
HALF_VERSION="ccollect $VERSION" HALF_VERSION="ccollect $VERSION"
FULL_VERSION="ccollect $VERSION ($RELEASE)" FULL_VERSION="ccollect $VERSION ($RELEASE)"
@ -78,14 +78,14 @@ fi
# #
INTERVAL=$1; shift INTERVAL=$1; shift
i=1 i=1
no_shares=0 no_sources=0
while [ $i -le $# ]; do while [ $i -le $# ]; do
eval arg=\$$i eval arg=\$$i
if [ "$NO_MORE_ARGS" = 1 ]; then if [ "$NO_MORE_ARGS" = 1 ]; then
eval share_${no_shares}=\"$arg\" eval source_${no_sources}=\"$arg\"
no_shares=$(($no_shares+1)) no_sources=$(($no_sources+1))
else else
case $arg in case $arg in
-a|--all) -a|--all)
@ -104,8 +104,8 @@ while [ $i -le $# ]; do
NO_MORE_ARGS=1 NO_MORE_ARGS=1
;; ;;
*) *)
eval share_${no_shares}=\"$arg\" eval source_${no_sources}=\"$arg\"
no_shares=$(($no_shares+1)) no_sources=$(($no_sources+1))
;; ;;
esac esac
fi fi
@ -125,7 +125,7 @@ fi
# #
if [ "$ALL" = 1 ]; then if [ "$ALL" = 1 ]; then
# reset everything specified before # reset everything specified before
no_shares=0 no_sources=0
# #
# get entries from sources # get entries from sources
@ -135,15 +135,15 @@ if [ "$ALL" = 1 ]; then
ls > "$TMP" ls > "$TMP"
while read tmp; do while read tmp; do
eval share_${no_shares}=\"$tmp\" eval source_${no_sources}=\"$tmp\"
no_shares=$(($no_shares+1)) no_sources=$(($no_sources+1))
done < "$TMP" done < "$TMP"
fi fi
# #
# Need at least ONE source to backup # Need at least ONE source to backup
# #
if [ "$no_shares" -lt 1 ]; then if [ "$no_sources" -lt 1 ]; then
usage usage
else else
echo "==> $HALF_VERSION: Beginning backup using interval $INTERVAL <==" echo "==> $HALF_VERSION: Beginning backup using interval $INTERVAL <=="
@ -174,12 +174,12 @@ fi
# Let's do the backup # Let's do the backup
# #
i=0 i=0
while [ "$i" -lt "$no_shares" ]; do while [ "$i" -lt "$no_sources" ]; do
# #
# Get current share # Get current source
# #
eval name=\$share_${i} eval name=\$source_${i}
i=$(($i+1)) i=$(($i+1))
export name export name