Last active
September 19, 2018 10:32
-
-
Save jona7o/45db3e410a75e89f42f9653bf26c3bbe to your computer and use it in GitHub Desktop.
Pull all git repositorys under a base bath
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 | |
# visit us @ innFactory.de | |
CUR_DIR=$(pwd) | |
GREEN='\033[0;32m' | |
NC='\033[0m' | |
echo "Pulling latest changes for all repositories..." | |
echo $CUR_DIR | |
for g in $(find . -name ".git" | cut -c 3-); do | |
PROJECTPATH=${g%.*} | |
echo -e "[${GREEN}X${NC}]" $PROJECTPATH; | |
cd $PROJECTPATH | |
git pull | |
cd $CUR_DIR | |
done | |
echo -e "${GREEN}Update completed${NC}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment