]>
Commit | Line | Data |
---|---|---|
319569e4 FG |
1 | #!/bin/bash |
2 | ||
3 | set -e | |
4 | ||
5 | top=$(pwd) | |
6 | ||
7 | if [ "$#" -ne 3 ]; then | |
8 | echo "USAGE: $0 repo patchdir ref" | |
28197846 | 9 | printf "\t exports patches from 'repo' to 'patchdir' based on 'ref'\n" |
319569e4 FG |
10 | exit 1 |
11 | fi | |
12 | ||
13 | # parameters | |
14 | kernel_submodule=$1 | |
15 | kernel_patchdir=$2 | |
16 | base_ref=$3 | |
17 | ||
18 | cd "${kernel_submodule}" | |
19 | echo "clearing old exported patchqueue" | |
20 | rm -f "${top}/${kernel_patchdir}"/*.patch | |
21 | echo "exporting patchqueue using 'git format-patch [...] ${base_ref}.." | |
22 | git format-patch \ | |
23 | --quiet \ | |
24 | --no-numbered \ | |
25 | --no-cover-letter \ | |
26 | --zero-commit \ | |
a6ee60dc | 27 | --no-signature \ |
2ad9e087 | 28 | --diff-algorithm=myers \ |
50953e9e | 29 | --output-directory="${top}/${kernel_patchdir}" \ |
319569e4 FG |
30 | "${base_ref}.." |
31 | ||
28197846 | 32 | git checkout "${base_ref}" |
319569e4 FG |
33 | |
34 | cd "${top}" |