diff options
| -rwxr-xr-x | scripts/combo-layer-hook-default.sh | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/scripts/combo-layer-hook-default.sh b/scripts/combo-layer-hook-default.sh index 46f2b70fc4..1e3a3b9bc8 100755 --- a/scripts/combo-layer-hook-default.sh +++ b/scripts/combo-layer-hook-default.sh | |||
| @@ -10,4 +10,11 @@ rev=$2 | |||
| 10 | reponame=$3 | 10 | reponame=$3 |
| 11 | 11 | ||
| 12 | sed -i -e "0,/^Subject:/s#^Subject: \[PATCH\] \($reponame: \)*\(.*\)#Subject: \[PATCH\] $reponame: \2#" $patchfile | 12 | sed -i -e "0,/^Subject:/s#^Subject: \[PATCH\] \($reponame: \)*\(.*\)#Subject: \[PATCH\] $reponame: \2#" $patchfile |
| 13 | sed -i -e "0,/^Signed-off-by:/s#\(^Signed-off-by:.*\)#\($reponame rev: $rev\)\n\n\1#" $patchfile | 13 | if grep -q '^Signed-off-by:' $patchfile; then |
| 14 | # Insert before Signed-off-by. | ||
| 15 | sed -i -e "0,/^Signed-off-by:/s#\(^Signed-off-by:.*\)#\(From $reponame rev: $rev\)\n\n\1#" $patchfile | ||
| 16 | else | ||
| 17 | # Insert before final --- separator, with extra blank lines removed. | ||
| 18 | perl -e "\$_ = join('', <>); s/^(.*\S[ \t]*)(\n|\n\s*\n)---\n/\$1\n\nFrom $reponame rev: $rev\n---\n/s; print;" $patchfile >$patchfile.tmp | ||
| 19 | mv $patchfile.tmp $patchfile | ||
| 20 | fi | ||
