]> Git [git.vados.ru] :: Repos - Mikrotiks/ros.vados.ru.git/commitdiff
Autocommit in repo: ros.vados.ru, generated by owner: root, in 21:47:07 08.03.2026.
authorvados-dev <vados@vados.ru>
Sun, 8 Mar 2026 18:47:08 +0000 (21:47 +0300)
committervados-dev <vados@vados.ru>
Sun, 8 Mar 2026 18:47:08 +0000 (21:47 +0300)
bin/check_repo.sh

index 148f5aa77841dcc8b39ea846db003518a4403d88..e8d81c97ee691914e87c5ca42b89a61ff9781723 100755 (executable)
@@ -4,9 +4,9 @@ cd "${REPO_DIR:-.}"
 
 dirty="$(git status --porcelain || true)"
 diff="$(git diff --quiet && git diff --cached --quiet || true)"
-lsfiles="$([ -z git ls-files --others --exclude-standard ] || true)"
+lsfiles="$(git ls-files --others --exclude-standard || true)"
 
-if [[ -n "$diff" && -n "$lsfiles" ]]; then
+if [[ -n "$diff" && -z "$lsfiles" ]]; then
     echo "[check] repo diff, go to proclean check."
     if [[ -n "$dirty" ]]; then
         echo "[check] repo dirty, stop"
@@ -17,7 +17,7 @@ if [[ -n "$diff" && -n "$lsfiles" ]]; then
     fi
 else
     echo "[check] not clean. Go to autocommit him."
-    if [[ -n "$lsfiles" ]]; then
+    if [[ -z "$lsfiles" ]]; then
         git add .
         git commit -m "${COMM_INFO}"
     else