Loading sync.sh +4 −2 Original line number Diff line number Diff line Loading @@ -24,12 +24,13 @@ success() { } warning "Starting at $(date -u)" rm -rvf * || die "Couldn't remove files" rm -rf repo || die "Couldn't remove files" if [ -n "$OPENWRT_GIT_URL" ]; then git config --global user.email "${OPENWRT_GIT_EMAIL:-openwrt@example.com}" || die "Couldn't set email" git config --global user.name "${OPENWRT_GIT_NAME:-OpenWRT Git bot}" || die "Couldn't set name" git clone -q "$OPENWRT_GIT_URL" . || die "Couldn't clone repo" git clone -q "$OPENWRT_GIT_URL" repo || die "Couldn't clone repo" cd repo || die "Couldn't enter repo dir" notify "Enterng main loop $(date -u)" while true; do Loading @@ -48,6 +49,7 @@ if [ -n "$OPENWRT_GIT_URL" ]; then sleep ${OPENWRT_SYNC_INTERVAL:-10} || die "Couldn't sleep correctly" done cd - die "Somebody has escaped from endless cycle" else die "OPENWRT_GIT_URL is not configured" Loading Loading
sync.sh +4 −2 Original line number Diff line number Diff line Loading @@ -24,12 +24,13 @@ success() { } warning "Starting at $(date -u)" rm -rvf * || die "Couldn't remove files" rm -rf repo || die "Couldn't remove files" if [ -n "$OPENWRT_GIT_URL" ]; then git config --global user.email "${OPENWRT_GIT_EMAIL:-openwrt@example.com}" || die "Couldn't set email" git config --global user.name "${OPENWRT_GIT_NAME:-OpenWRT Git bot}" || die "Couldn't set name" git clone -q "$OPENWRT_GIT_URL" . || die "Couldn't clone repo" git clone -q "$OPENWRT_GIT_URL" repo || die "Couldn't clone repo" cd repo || die "Couldn't enter repo dir" notify "Enterng main loop $(date -u)" while true; do Loading @@ -48,6 +49,7 @@ if [ -n "$OPENWRT_GIT_URL" ]; then sleep ${OPENWRT_SYNC_INTERVAL:-10} || die "Couldn't sleep correctly" done cd - die "Somebody has escaped from endless cycle" else die "OPENWRT_GIT_URL is not configured" Loading