From a2fa6b8b6a7ac90d1e888251ab7d30f2476c54d2 Mon Sep 17 00:00:00 2001 From: klein panic Date: Fri, 28 Feb 2025 22:00:11 -0500 Subject: [PATCH] Automated update --- auto_git_update.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/auto_git_update.sh b/auto_git_update.sh index b389c34..b7956d4 100755 --- a/auto_git_update.sh +++ b/auto_git_update.sh @@ -448,3 +448,16 @@ if check_wifi; then else echo "No WiFi connection detected. Changes committed locally." fi + +update_repo_list() { + local repo_list_file="$HOME/.config/setup/autogitupdate.txt" + echo "Scanning for Git repositories..." + # Adjust the search path as needed (e.g., $HOME or a specific projects directory) + find "$HOME" -type d -name ".git" -prune | sed 's/\/.git$//' > "$repo_list_file" + echo "Repository list updated at $repo_list_file" +} + +if [[ "$1" == "--update-repos" ]]; then + update_repo_list + exit 0 +fi