Commit 705d3280 authored by Dmitriy Safronov's avatar Dmitriy Safronov
Browse files

fix

parent 4a1ee376
Loading
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -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
@@ -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"