diff --git a/Makefile b/Makefile index 494dbcb..e509290 100644 --- a/Makefile +++ b/Makefile @@ -208,4 +208,5 @@ test: ccollect.sh /tmp/ccollect test2: ccollect.sh /tmp/ccollect cd ./conf/sources/; for s in *; do CCOLLECT_CONF=../ ../../ccollect.sh daily "$$s"; done + touch /tmp/ccollect/$$(ls /tmp/ccollect | head -n1).ccollect-marker CCOLLECT_CONF=./conf ./ccollect.sh -a daily diff --git a/ccollect.sh b/ccollect.sh index 7747fcc..41411da 100755 --- a/ccollect.sh +++ b/ccollect.sh @@ -110,7 +110,7 @@ delete_from_file() [ $# -eq 1 ] && suffix="$1" && shift while read to_remove; do set -- "$@" "${to_remove}" - if [ "$suffix" ]; then + if [ "${suffix}" ]; then to_remove_no_suffix="$(echo ${to_remove} | sed "s/$suffix\$//")" set -- "$@" "${to_remove_no_suffix}" fi