]> git.ozlabs.org Git - next-scripts/blob - to_ozlabs
update to_build_host a bit
[next-scripts] / to_ozlabs
1 #!/bin/bash
2
3 GIT_REPOS='next next-history.git quilt next-fixes tools etc mmotm'
4
5 NEXT_DIR="$HOME/kernels/next"
6
7 if ! cd "$NEXT_DIR"; then
8         printf '%s: cannot cd to %s\n' "$0" "$NEXT_DIR" 1>&2
9         exit 1
10 fi
11
12 printf 'Updating Linus'\'' tree\n'
13 ssh ozlabs.org 'cd kernels/linus.git; git remote update'
14
15 for i in $GIT_REPOS; do
16         printf 'Pushing %s\n' "$i"
17         ( cd "$i" && git push --prune bilbo )
18         if [ "${i%.git}" = "$i" ]; then
19                 ssh ozlabs.org 'cd kernels/next/'"$i"'; git reset --hard'
20         fi
21 done
22
23 {
24         cat <<EOF
25 - gitk.cache
26 - /merge.debug
27 - /merge.log
28 - /akpm-import.log
29 - /summ
30 - /patch-*-next-2*
31 - /next-2*/
32 + .git/
33 + .git/config
34 + .git/hooks
35 + .git/hooks/**
36 + /next/.git/rr-cache/
37 + /next/.git/rr-cache/**
38 EOF
39         for i in $GIT_REPOS; do
40                 echo "- $i/**"
41         done
42 } | rsync -avHP --open-noatime --include-from - --delete . ozlabs.org:kernels/next/.
43
44 ssh ozlabs.org 'touch kernels/NEXT-DONE'
45
46 # Fix up the git configs so that the next pushes will work
47 ssh ozlabs.org '
48 cd kernels/next
49 for i in '"$GIT_REPOS"'; do
50 (
51         cd $i
52         git config receive.denyCurrentBranch ignore
53 )
54 done'
55
56 exit 0