diff --git a/scripts/auto_commit.sh b/scripts/auto_commit.sh index 5bc3438..61989c7 100755 --- a/scripts/auto_commit.sh +++ b/scripts/auto_commit.sh @@ -42,6 +42,9 @@ if [ "$(git status --porcelain)" ]; then cd "$REPO_DIR" && git -c user.name="$GIT_COMMITTER_NAME" -c user.email="$GIT_COMMITTER_EMAIL" commit --no-gpg-sign --author "$AUTHOR" -m "$MESSAGE" || notify "Failed committing changes in $REPO_DIR" cd "$REPO_DIR" && printf "%s\n" "$SSH_PW" | git push || notify "Failed pushing changes in $REPO_DIR" fi +if [ "$(cd "$REPO_DIR" && git diff --name-only --diff-filter=U --relative | head -c1 | wc -c)" -ne 0 ]; then + XDG_RUNTIME_DIR=/run/user/$(id -u) notify-send -u "critical" --wait "Something's gone very wrong: $REPO_DIR" +fi notify "Done updating changes in $REPO_DIR"