From f40f0259bd45d3d43194cda2f20552137dad623c Mon Sep 17 00:00:00 2001 From: schmeeve Date: Sun, 10 May 2026 12:57:59 -0700 Subject: [PATCH] checkin all script --- checkin-all | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 checkin-all diff --git a/checkin-all b/checkin-all new file mode 100755 index 0000000..92969f7 --- /dev/null +++ b/checkin-all @@ -0,0 +1,28 @@ +#!/bin/bash +set -euo pipefail + +GIT_HOME="${HOME}/git" + +for dir in "${GIT_HOME}"/*/; do + if [ -d "${dir}/.git" ]; then + repo=$(basename "${dir}") + remote=$(git -C "${dir}" remote get-url origin 2>/dev/null || true) + case "${remote}" in + *schmeeve*) + ;; + *) + echo " Skipping (not your repo: ${remote})" + continue + ;; + esac + echo "=== ${repo} ===" + cd "${dir}" + if [ -n "$(git status --porcelain 2>/dev/null)" ]; then + echo " Changes found → committing and pushing..." + git commit -a -m "auto: $(date '+%Y-%m-%d %H:%M')" || echo " Nothing to commit (maybe no tracked files changed)" + git push + else + echo " Clean." + fi + fi +done