Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== GIT ====== ===== Managing repo ===== <code> #!/usr/bin/env bash update_git() { local dir="$1" for subdir in "$dir"/*; do echo "Going into $subdir" if [[ -d "$subdir" ]]; then cd "$subdir" || exit if [[ -d .git ]]; then echo "actions todo into git folder" else update_git "$subdir" fi cd - fi done } if [[ "$1" == "" ]]; then dir_to_update=$(pwd) else dir_to_update="$1" fi for dir in "${dir_to_update}"/* ; do case $(basename "$dir") in puppet) echo "Going into $dir" update_git "$dir" ;; *) echo "$dir not managed" ;; esac done </code> utils/git.txt Last modified: 2024/10/14 20:59by 127.0.0.1