Created
June 15, 2020 22:46
-
-
Save mitsuhisaT/86673fb555edb4a4129065f4a83722ac to your computer and use it in GitHub Desktop.
Syncing multiple upstream bash scripts.
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
Aerial master | |
Pi_Servo_Hat master | |
RPi_Cam_Web_Interface master | |
RPi_PanTilt_Camera_Kit master | |
tensorflow/docs-l10n master | |
covid19 development | |
covid19-saitama development | |
aiyprojects-raspbian aiyprojects |
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
#!/usr/bin/env bash | |
sync_upstream() | |
{ | |
cd $1 | |
pwd | |
# echo $2 | |
git fetch upstream | |
git merge upstream/$2 | |
git push | |
cd - | |
} | |
while read repo default | |
do | |
sync_upstream $repo $default | |
done < githubrepos.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
These are to sync upstream repositories script.
Please edit 'githubrepos.txt' for your repositories.
The first is repository's name, the second is default branch name.
You may separate a space.
Enjoy!