mirror of
git://git.yoctoproject.org/poky.git
synced 2025-07-19 12:29:01 +02:00

The existing patch might already have the desired prefix, perhaps even multiple times (due to some previous import error). Ensure that after the replace, the prefix is present exactly once. (From OE-Core rev: 03be3d350425783a5938a7e4c0b858cda634b71d) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
14 lines
369 B
Bash
Executable File
14 lines
369 B
Bash
Executable File
#!/bin/sh
|
|
# Hook to add source component/revision info to commit message
|
|
# Parameter:
|
|
# $1 patch-file
|
|
# $2 revision
|
|
# $3 reponame
|
|
|
|
patchfile=$1
|
|
rev=$2
|
|
reponame=$3
|
|
|
|
sed -i -e "s#^Subject: \[PATCH\] \($reponame: \)*\(.*\)#Subject: \[PATCH\] $reponame: \2#" $patchfile
|
|
sed -i -e "0,/^Signed-off-by:/s#\(^Signed-off-by:.*\)#\($reponame rev: $rev\)\n\n\1#" $patchfile
|