| 1 | #!/usr/bin/env bash |
| 2 | |
| 3 | set -eu |
| 4 | |
| 5 | # sudo -u gitdaemon git clone --mirror git://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git |
| 6 | |
| 7 | update_git() { |
| 8 | local repodir="$1" |
| 9 | local origin="$2" |
| 10 | |
| 11 | if [ ! -d "${repodir}" ] ; then |
| 12 | git clone --mirror "${origin}" "${repodir}" |
| 13 | fi |
| 14 | |
| 15 | pushd "$repodir" |
| 16 | |
| 17 | git remote update |
| 18 | #git gc |
| 19 | mkdir -p info/web |
| 20 | git for-each-ref --sort=-committerdate --format='%(committerdate:iso8601)' --count=1 >info/web/last-modified |
| 21 | |
| 22 | popd |
| 23 | } |
| 24 | |
| 25 | ## |
| 26 | # Vanilla composite repo |
| 27 | ## |
| 28 | |
| 29 | update_git linux-all.git/ https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git |
| 30 | |
| 31 | pushd linux-all.git/ |
| 32 | ## Add stable if needed |
| 33 | if ! git remote | grep -q stable ; then |
| 34 | git remote add stable https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git |
| 35 | git fetch stable |
| 36 | fi |
| 37 | ## Delete broken tree tags |
| 38 | git tag -d v2.6.11 || true |
| 39 | git tag -d v2.6.11-tree || true |
| 40 | popd |
| 41 | |
| 42 | ## |
| 43 | # Ubuntu kernels |
| 44 | ## |
| 45 | |
| 46 | update_git ubuntu-focal.git/ git://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/focal |
| 47 | |
| 48 | update_git ubuntu-jammy.git/ git://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/jammy |
| 49 | |
| 50 | update_git ubuntu-noble.git/ git://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/noble |
| 51 | |
| 52 | ## |
| 53 | # GDB repos |
| 54 | ## |
| 55 | |
| 56 | update_git binutils-gdb.git/ git://sourceware.org/git/binutils-gdb.git |