Last active
August 29, 2015 14:02
-
-
Save yene/0a1fb83a25831499ec82 to your computer and use it in GitHub Desktop.
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 | |
/usr/bin/ssh git@op6 expand > repos.txt | |
myarr=($(awk '{print $NF}' repos.txt)) | |
counter=0 | |
for i in "${myarr[@]}" | |
do | |
counter=$(($counter+1)) | |
if [ "$counter" -eq 1 ] || [ "$counter" -eq 2 ] | |
then | |
continue | |
fi | |
/usr/local/bin/git clone --mirror git@op6:$i $i | |
/usr/local/bin/git --git-dir $i remote update | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment