e6f2f4c0f83c11b5c5be5c46215c3cc2ccfab763
[tools.git] / review-tools / opensslpull
1 #! /bin/bash
2 # Script to fetch and rebase openssl branches
3
4 test -f ./config || {
5     echo Not at top-level
6     exit 1
7 }
8
9 git checkout --quiet OpenSSL_1_0_2-stable ; git pull --rebase
10 git checkout --quiet OpenSSL_1_1_0-stable ; git pull --rebase
11 git checkout --quiet OpenSSL_1_1_1-stable ; git pull --rebase
12 git checkout --quiet openssl-3.0 ; git pull --rebase
13 git checkout --quiet openssl-3.1 ; git pull --rebase
14 git checkout --quiet master
15 git rebase -p origin/master
16
17 for B in `git branch | fgrep -v '*'` ; do
18     case "$B" in
19     OpenSSL*-stable)
20         echo "        skipping $B"
21         ;;
22     openssl-*)
23         echo "        skipping $B"
24         ;;
25     *)
26         # If .skiplist exists and this branch is listed, don't rebase
27         if test -f .skiplist && grep -q "$B" .skiplist ; then
28             echo "        skipping $B"
29         else
30             git checkout --quiet $B
31             git rebase master || exit 1
32         fi
33         ;;
34     esac
35 done
36
37 git checkout --quiet master