summaryrefslogtreecommitdiff
path: root/roles/gitserver/files/restore-backup.sh
blob: 8fc0de568f6cda86c0c759b97a5f1a01e3269f48 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh -e

cd old-repositories
for repo in *.git; do
	if [ x"$repo" = x"gitolite-admin.git" ]; then
		continue;
	fi

	cd $repo
	if [ $(git branch | wc -l) -ne 0 ]; then
		gitolite push --mirror "../../repositories/$repo"
	fi
	cd ..
done