Add the git-mirror script uses on Jenkins
This is run on one of Jenkins Linux machines to mirror all the SF repos for faster cloning and builds when SF is offline.
This commit is contained in:
parent
da0f443f62
commit
ed88c630ea
1 changed files with 22 additions and 0 deletions
22
update_git_mirror.sh
Executable file
22
update_git_mirror.sh
Executable file
|
@ -0,0 +1,22 @@
|
|||
#!/bin/bash
|
||||
|
||||
mirror_dirs='fgdata fgmeta flightgear simgear getstart windows-3rd-party fgrun'
|
||||
|
||||
pushd /var/lib/git
|
||||
|
||||
for dir in $mirror_dirs
|
||||
do
|
||||
repo_name=$dir.git
|
||||
if [ ! -d "$repo_name" ]; then
|
||||
echo "Doing initial clone"
|
||||
git clone --mirror git://git.code.sf.net/p/flightgear/$dir
|
||||
fi
|
||||
|
||||
pushd $repo_name
|
||||
echo "Updating in $PWD"
|
||||
git remote update
|
||||
popd
|
||||
done
|
||||
|
||||
popd
|
||||
|
Loading…
Reference in a new issue