Created
September 1, 2021 12:39
-
-
Save mfurquimdev/40082034fed05433e30147c05126e90e to your computer and use it in GitHub Desktop.
Crawl project directories and update master branches
This file contains hidden or 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
| for d in *; | |
| do | |
| if [ -d "$d" ]; | |
| then | |
| pushd "$d"; | |
| update_master.sh | |
| popd; | |
| fi; | |
| done; |
This file contains hidden or 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
| if [ -d .git ]; | |
| then | |
| current_branch=$(git branch --show-current); | |
| git checkout master; | |
| git pull; | |
| git checkout ${current_branch}; | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment