]> git.proxmox.com Git - pve-kernel.git/blame - debian/scripts/import-patchqueue
rebase patches on top of Ubuntu-4.15.0-34.37
[pve-kernel.git] / debian / scripts / import-patchqueue
CommitLineData
319569e4
FG
1#!/bin/bash
2
3set -e
4
5top=$(pwd)
6
7if [[ "$#" -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
11fi
12
13
14# parameters
15kernel_submodule=$1
16kernel_patchdir=$2
17if [[ -z "$3" ]]; then
18 pq_branch='pq'
19else
20 pq_branch=$3
21fi
22
23cd "${kernel_submodule}"
24echo "creating patchqeueue branch '${pq_branch}'"
25git checkout -b "${pq_branch}"
26echo "importing patches from '${kernel_patchdir}'"
27git am "${top}/${kernel_patchdir}"/*.patch
28
29cd "${top}"