]> git.proxmox.com Git - pve-kernel.git/blob - debian/scripts/import-patchqueue
debian/scripts: add patchqueue scripts
[pve-kernel.git] / debian / scripts / import-patchqueue
1 #!/bin/bash
2
3 set -e
4
5 top=$(pwd)
6
7 if [[ "$#" -lt 2 || "$#" -gt 3 ]]; then
8 echo "USAGE: $0 repo patchdir [branch]"
9 echo "\t imports patches from 'patchdir' into patchqueue branch 'branch' in 'repo'"
10 exit 1
11 fi
12
13
14 # parameters
15 kernel_submodule=$1
16 kernel_patchdir=$2
17 if [[ -z "$3" ]]; then
18 pq_branch='pq'
19 else
20 pq_branch=$3
21 fi
22
23 cd "${kernel_submodule}"
24 echo "creating patchqeueue branch '${pq_branch}'"
25 git checkout -b "${pq_branch}"
26 echo "importing patches from '${kernel_patchdir}'"
27 git am "${top}/${kernel_patchdir}"/*.patch
28
29 cd "${top}"