From 3d957a1c86afc6f314147cd2cd80f421fece93ad Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 6 Dec 2005 15:07:13 +0100 Subject: [PATCH] Added first intervall description, added more fine configuration --- README | 11 +++++++++++ ccollect.sh | 47 ++++++++++++++++++++++++++++++++++++----------- 2 files changed, 47 insertions(+), 11 deletions(-) diff --git a/README b/README index 9a9d4c7..423a602 100644 --- a/README +++ b/README @@ -1,3 +1,6 @@ +-------------------------------------------------------------------------------- +ccollect.sh, Nico Schottelius, 2005-12-06 +-------------------------------------------------------------------------------- $CCOLLECT_CONF/ -> Directories, which are so called 'backup-definitions' @@ -5,4 +8,12 @@ $CCOLLECT_CONF/ source -> file with the source destination -> link to the destination exclude -> \n seperated + + +-------------------------------------------------------------------------------- + intervalls/ - subdirectory of source or defaults + + Each file below this directory describe an intervalls. + +-------------------------------------------------------------------------------- diff --git a/ccollect.sh b/ccollect.sh index 80fb4ac..0bfa367 100755 --- a/ccollect.sh +++ b/ccollect.sh @@ -5,8 +5,17 @@ # Last Modified: +# +# temporary as long as inofficial +# CCOLLECT_CONF=$HOME/crsnapshot/conf + +# +# where to find our configuration +# CCOLLECT_CONF=${CCOLLECT_CONF:-/etc/ccollect} +CSOURCES=$CCOLLECT_CONF/sources/ +CDEFAULTS=$CCOLLECT_CONF/defaults/ # # Tell how to use us @@ -35,23 +44,39 @@ no_shares=0 while [ $i -le $# ]; do eval arg=\$$i - - case $arg in - -h|--help) - usage - ;; - --) - break - ;; - *) + + if [ "$NO_MORE_ARGS" = 1 ]; then eval share_${no_shares}="$arg" no_shares=$((no_shares+1)) - ;; - esac + else + case $arg in + -a|--all) + ALL=1 + ;; + -p|--parallel) + PARALLEL=1 + ;; + -v|--verbose) + VERBOSE=1 + ;; + -h|--help) + usage + ;; + --) + NO_MORE_ARGS=1 + ;; + *) + eval share_${no_shares}="$arg" + no_shares=$((no_shares+1)) + ;; + esac + fi i=$((i+1)) done + + exit 1 if [ -z "$(ls $CCOLLECT_CONF 2>/dev/null)" ]; then