X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=config%2Fdebian%2Fcron.dinstall;h=068ac625e98b1a6d4cd00aa368b330b2d74dd25c;hb=fb979d6ea8674b80caaedbcb79144bef45560d48;hp=be7413a4ca25c161618d631569e3a32f0c49f594;hpb=247b94e0ef96999da318dc9d1cb8072f60948f80;p=dak.git diff --git a/config/debian/cron.dinstall b/config/debian/cron.dinstall index be7413a4..068ac625 100755 --- a/config/debian/cron.dinstall +++ b/config/debian/cron.dinstall @@ -71,17 +71,17 @@ function stage() { ARGS='GO[@]' local "${!ARGS}" - error=${ERR:-"true"} + local error=${ERR:-"true"} ARGS=${ARGS:-""} log "########## DINSTALL BEGIN: ${FUNC} ${ARGS} ##########" - STAGEFILE="${stagedir}/${FUNC}_${ARGS}" + local STAGEFILE="${stagedir}/${FUNC}_${ARGS}" STAGEFILE=${STAGEFILE// /_} if [ -f "${STAGEFILE}" ]; then - stamptime=$(/usr/bin/stat -c %Z "${STAGEFILE}") - unixtime=$(date +%s) - difference=$(( $unixtime - $stamptime )) + local stamptime=$(/usr/bin/stat -c %Z "${STAGEFILE}") + local unixtime=$(date +%s) + local difference=$(( $unixtime - $stamptime )) if [ ${difference} -ge 14400 ]; then log_error "Did already run ${FUNC}, stagefile exists, but that was ${difference} seconds ago. Please check." else @@ -224,7 +224,7 @@ while read FUNC ARGS TIME ERR BACKGROUND; do esac done < <(cat - <