From ab5a35a1331ad316e87c25058534e8282595ac5c Mon Sep 17 00:00:00 2001 From: Hyperling Date: Thu, 16 Jul 2026 15:35:26 -0700 Subject: [PATCH] Move bulk of code-check to shared as git-check so that it can be used anywhere (such as ZZ_INACTIVE). Reference the new function and pass the dir we want to check. --- tasks/general/acct_mgmt/users.yml | 28 +--------------------------- 1 file changed, 1 insertion(+), 27 deletions(-) diff --git a/tasks/general/acct_mgmt/users.yml b/tasks/general/acct_mgmt/users.yml index a1fc068..198c9d0 100644 --- a/tasks/general/acct_mgmt/users.yml +++ b/tasks/general/acct_mgmt/users.yml @@ -619,33 +619,7 @@ alias docker-start="docker compose up -d && docker compose start" alias docker-prep="docker compose pull && docker compose build" alias_code_check: | - alias code-check=' - echo "Checking ~/Code directory for git changes." - ls -d ~/Code/* | while read project; do - if [[ ! -d $project ]]; then - continue - fi - echo -e "\n*** `basename $project` ***" - cd $project - if [[ -d .git ]]; then - git ls-remote --exit-code --heads origin dev - dev_exists="$?" - if [[ "$dev_exists" == 0 ]]; then - git switch dev - elif [[ "$dev_exists" == 2 ]]; then - git switch main - else - echo "ERROR: Unknown status for dev_exists, '$dev_exists'." - continue - fi - git pull - git push - else - echo "Not a Git project, skipping!" - fi - done - echo -e "\nDone!" - ' + alias code-check='git-check $HOME/Code' alias code-sync='code-check' alias_code_reset: | alias code-reset='