Created
September 29, 2024 13:38
-
-
Save amir-saniyan/9663620bf97577c0b67617cc280165cc to your computer and use it in GitHub Desktop.
Pull all subdirectory repositories script (two level nested)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
SCRIPTPATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )" | |
cd "$SCRIPTPATH" | |
for dir in */ ; do | |
echo "$dir" | |
cd "$SCRIPTPATH/$dir" | |
if [[ ! -d ".git/" ]] | |
then | |
cd "$SCRIPTPATH/$dir/$dir" | |
fi | |
git pull | |
echo "################################################################################" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment