1
0
mirror of https://github.com/php/systems.git synced 2026-03-23 23:32:12 +01:00
Files
archived-systems/update-mirrors
2025-06-19 16:31:39 +01:00

52 lines
1.6 KiB
Bash
Executable File

#!/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
# The presentation system also uses the reveal.js submodule
(cd /local/mirrors/talks && git submodule update --init reveal.js)
# Systems scripts were dropped down a level at some point.
cd /local/systems;
$GIT_FETCH && $GIT_RESET;