From 014d5c282e76a04438ea9739b2ba02f5a5f10235 Mon Sep 17 00:00:00 2001 From: Dmitriy Safronov Date: Fri, 18 Feb 2022 16:08:20 +0300 Subject: [PATCH 1/2] zomg --- sync.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sync.sh b/sync.sh index 3af290d..6544532 100644 --- a/sync.sh +++ b/sync.sh @@ -38,8 +38,9 @@ if [ -n "$OPENWRT_GIT_URL" ]; then git pull -q || die "Couldn't pull repo" 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" + find overlay/ -type d -empty -not -path "./.git/*" -exec touch {}/.gitkeep \; + git add -A > /dev/null || die "Couldn't add files" if [ -n "$(git status -su)" ]; then warning "Updating at $(date -u)" git commit -q -m OpenWRT || die "Couldn't commit changes" -- GitLab From 5dacfdad015d32a120896ae3629cf3c1b94a3a85 Mon Sep 17 00:00:00 2001 From: Dmitriy Safronov Date: Fri, 18 Feb 2022 16:09:50 +0300 Subject: [PATCH 2/2] zomfg --- sync.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sync.sh b/sync.sh index 6544532..655e33c 100644 --- a/sync.sh +++ b/sync.sh @@ -38,7 +38,7 @@ if [ -n "$OPENWRT_GIT_URL" ]; then git pull -q || die "Couldn't pull repo" 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" - find overlay/ -type d -empty -not -path "./.git/*" -exec touch {}/.gitkeep \; + find overlay/ -type d -empty -exec touch {}/.gitkeep \; git add -A > /dev/null || die "Couldn't add files" if [ -n "$(git status -su)" ]; then -- GitLab