debian/scripts: add patchqueue scripts
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
parent
679a836a3a
commit
319569e4be
33
debian/scripts/export-patchqueue
vendored
Executable file
33
debian/scripts/export-patchqueue
vendored
Executable file
@ -0,0 +1,33 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
top=$(pwd)
|
||||||
|
|
||||||
|
if [ "$#" -ne 3 ]; then
|
||||||
|
echo "USAGE: $0 repo patchdir ref"
|
||||||
|
echo "\t exports patches from 'repo' to 'patchdir' based on 'ref'"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# parameters
|
||||||
|
kernel_submodule=$1
|
||||||
|
kernel_patchdir=$2
|
||||||
|
base_ref=$3
|
||||||
|
|
||||||
|
cd "${kernel_submodule}"
|
||||||
|
echo "clearing old exported patchqueue"
|
||||||
|
rm -f "${top}/${kernel_patchdir}"/*.patch
|
||||||
|
echo "exporting patchqueue using 'git format-patch [...] ${base_ref}.."
|
||||||
|
git format-patch \
|
||||||
|
--quiet \
|
||||||
|
--no-numbered \
|
||||||
|
--no-cover-letter \
|
||||||
|
--zero-commit \
|
||||||
|
--output-dir \
|
||||||
|
"${top}/${kernel_patchdir}" \
|
||||||
|
"${base_ref}.."
|
||||||
|
|
||||||
|
git checkout ${base_ref}
|
||||||
|
|
||||||
|
cd "${top}"
|
29
debian/scripts/import-patchqueue
vendored
Executable file
29
debian/scripts/import-patchqueue
vendored
Executable file
@ -0,0 +1,29 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
top=$(pwd)
|
||||||
|
|
||||||
|
if [[ "$#" -lt 2 || "$#" -gt 3 ]]; then
|
||||||
|
echo "USAGE: $0 repo patchdir [branch]"
|
||||||
|
echo "\t imports patches from 'patchdir' into patchqueue branch 'branch' in 'repo'"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# parameters
|
||||||
|
kernel_submodule=$1
|
||||||
|
kernel_patchdir=$2
|
||||||
|
if [[ -z "$3" ]]; then
|
||||||
|
pq_branch='pq'
|
||||||
|
else
|
||||||
|
pq_branch=$3
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd "${kernel_submodule}"
|
||||||
|
echo "creating patchqeueue branch '${pq_branch}'"
|
||||||
|
git checkout -b "${pq_branch}"
|
||||||
|
echo "importing patches from '${kernel_patchdir}'"
|
||||||
|
git am "${top}/${kernel_patchdir}"/*.patch
|
||||||
|
|
||||||
|
cd "${top}"
|
Loading…
Reference in New Issue
Block a user