ansible: Add mirror of patch SLE kernel source
[lttng-ci.git] / automation / ansible / roles / gitmirror / files / update.sh
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 # SLES kernels
44 ##
45 update_git sles.git/ https://github.com/SUSE/kernel.git
46
47 ##
48 # Ubuntu kernels
49 ##
50
51 update_git ubuntu-focal.git/ git://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/focal
52
53 update_git ubuntu-jammy.git/ git://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/jammy
54
55 update_git ubuntu-noble.git/ git://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/noble
56
57 ##
58 # GDB repos
59 ##
60
61 update_git binutils-gdb.git/ git://sourceware.org/git/binutils-gdb.git
This page took 0.030298 seconds and 4 git commands to generate.