X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=config%2Fdebian%2Fcron.dinstall;h=fe546cabd2d5234aa367e5bbfaa0a347d0db7268;hb=4c9cfed0efb18ec218897b9968a6b8ef44afed7c;hp=c17d7a5cf522ab52374db7be2cf896c3f4592061;hpb=40e4af994797580b62f720d807bb70fc7f4587d1;p=dak.git diff --git a/config/debian/cron.dinstall b/config/debian/cron.dinstall index c17d7a5c..fe546cab 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 @@ -223,52 +223,52 @@ while read FUNC ARGS TIME ERR BACKGROUND; do ;; esac done < <(cat - <