Signed-off-by: Nico Schottelius <nico@ikn.schottelius.org>
This commit is contained in:
Nico Schottelius 2009-11-01 14:37:32 +01:00
parent d79c2b0a28
commit a48fe6d41b
2 changed files with 2 additions and 1 deletions

View file

@ -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

View file

@ -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