-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathupdate-mirrors
executable file
·48 lines (40 loc) · 1.43 KB
/
update-mirrors
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/sh
GIT_FETCH="git fetch --quiet origin"
GIT_RESET="git reset --quiet --hard origin/master"
GIT_RESET_MAIN="git reset --quiet --hard origin/main"
# Update in its own dedicate checkout first
# It'll be moved to /local/mirrors/phpweb in update-phpweb-backend
for i in phpweb; do
cd /local/repos/$i
$GIT_FETCH && $GIT_RESET
git submodule update
done
# Websites needing the 'shared' module
for i in docweb php-people-web qaweb php-gcov-web php-master-web php-news-web php-bugs-web php-gtk-web talks; do
cd /local/mirrors/$i
$GIT_FETCH && $GIT_RESET;
(cd shared && $GIT_FETCH && $GIT_RESET)
done
# For sites where master has been renamed to main, and need the 'shared' module
for i in php-main-web; do
cd /local/mirrors/$i
$GIT_FETCH && $GIT_RESET_MAIN;
(cd shared && $GIT_FETCH && $GIT_RESET)
done
# For sites where the default branch is 'main', and do not use the 'shared' module
for i in php-analytics-web php-downloads-web; do
cd /local/mirrors/$i
$GIT_FETCH && $GIT_RESET_MAIN;
done
# The wikibox is special. doesn't do full module rsync :(
cd /local/mirrors/php-wiki/dokuwiki
$GIT_FETCH && $GIT_RESET;
(cd shared && $GIT_FETCH && $GIT_RESET)
# Other stuffs
for i in systems doc-editor php-shared talks talks/presentations php-gtk-doc peclweb; do
cd /local/mirrors/$i
$GIT_FETCH && $GIT_RESET;
done
# Systems scripts were dropped down a level at some point.
cd /local/systems;
$GIT_FETCH && $GIT_RESET;