]>
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" | |
9 | echo "\t exports patches from 'repo' to 'patchdir' based on 'ref'" | |
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 \ |
319569e4 FG |
28 | --output-dir \ |
29 | "${top}/${kernel_patchdir}" \ | |
30 | "${base_ref}.." | |
31 | ||
32 | git checkout ${base_ref} | |
33 | ||
34 | cd "${top}" |