From a48fe6d41b98b4bee2b89c4a02c18533ace6c1ea Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sun, 1 Nov 2009 14:37:32 +0100 Subject: [PATCH] +braces Signed-off-by: Nico Schottelius --- Makefile | 1 + ccollect.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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