#!/bin/sh if [ "$1" = "--output" ]; then output=true shift fi if [ "$1" = "" ]; then daysago=0 else daysago=$1 fi top="$( cd "$(dirname "$0")/../" >/dev/null 2>&1 && pwd )" for update in ${top}/bin/comics/* ; do comic=$(basename $update) if [ "$output" = "true" ]; then ${update} "${top}" "${daysago}" & else myDate=$(date -Im --date "$daysago days ago") echo "---------------- $myDate ----------------" >> ${top}/log/${comic}.log ${update} "${top}" "${daysago}" >> ${top}/log/${comic}.log 2>&1 & fi sleep 2 done