Commit 7c6d51be authored by Dmitriy Safronov's avatar Dmitriy Safronov
Browse files

silence

parent c5bc6f97
Loading
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -16,15 +16,15 @@ if [ -n "$OPENWRT_GIT_URL" ]; then
    git config user.name "${OPENWRT_GIT_NAME:-OpenWRT Git bot}" || die "Couldn't set name"

    while true; do
        git reset --hard || die "Couldn't reset repo"
        git pull || die "Couldn't pull repo"
        git reset --hard > /dev/null || die "Couldn't reset repo"
        git pull > /dev/null || die "Couldn't pull repo"

        LC_ALL=C.UTF-8 rsync -vax --delete-after --exclude '*-opkg' -e "ssh -p ${OPENWRT_SSH_PORT:-22}" "${OPENWRT_SSH_HOST:-root@192.168.0.1}:/overlay/upper/" overlay/ || die "Couldn't rsync config"
        git add -A || die "Couldn't add files"
        LC_ALL=C.UTF-8 rsync -qax --delete-after --exclude '*-opkg' -e "ssh -p ${OPENWRT_SSH_PORT:-22}" "${OPENWRT_SSH_HOST:-root@192.168.0.1}:/overlay/upper/" overlay/ || die "Couldn't rsync config"
        git add -A > /dev/null || die "Couldn't add files"

        if [ -n "$(git status -su)" ]; then
            git commit -m OpenWRT 2> /dev/null || die "Couldn't commit changes"
            git push --force origin HEAD:${OPENWRT_GIT_BRANCH:-remote} 2> /dev/null || die "Couldn't push changes"
            git commit -m OpenWRT > /dev/null || die "Couldn't commit changes"
            git push --force origin HEAD:${OPENWRT_GIT_BRANCH:-remote} || die "Couldn't push changes"
        fi

        sleep ${OPENWRT_SYNC_INTERVAL:-10} || die "Couldn't sleep correctly"