Created
November 15, 2017 08:10
-
-
Save zserghei/e8b3df2714ad849f83ef6d0e21edb019 to your computer and use it in GitHub Desktop.
Pull multiple git projects
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
#!/bin/bash | |
set -e # Exit immediately if a command exits with a non-zero status. | |
for d in *; do | |
if [[ -d $d && -f $d/pom.xml ]]; then | |
echo " Processing $d" | |
git -C $d -c diff.mnemonicprefix=false -c core.quotepath=false fetch origin | |
git -C $d -c diff.mnemonicprefix=false -c core.quotepath=false pull origin | |
git -C $d -c diff.mnemonicprefix=false -c core.quotepath=false submodule update --init --recursive | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment