diff options
Diffstat (limited to 'scripts/combo-layer-hook-default.sh')
| -rwxr-xr-x | scripts/combo-layer-hook-default.sh | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/scripts/combo-layer-hook-default.sh b/scripts/combo-layer-hook-default.sh deleted file mode 100755 index fb9651b31f..0000000000 --- a/scripts/combo-layer-hook-default.sh +++ /dev/null | |||
| @@ -1,25 +0,0 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | # | ||
| 3 | # Copyright OpenEmbedded Contributors | ||
| 4 | # | ||
| 5 | # SPDX-License-Identifier: GPL-2.0-only | ||
| 6 | # | ||
| 7 | # Hook to add source component/revision info to commit message | ||
| 8 | # Parameter: | ||
| 9 | # $1 patch-file | ||
| 10 | # $2 revision | ||
| 11 | # $3 reponame | ||
| 12 | |||
| 13 | patchfile=$1 | ||
| 14 | rev=$2 | ||
| 15 | reponame=$3 | ||
| 16 | |||
| 17 | sed -i -e "0,/^Subject:/s#^Subject: \[PATCH\] \($reponame: \)*\(.*\)#Subject: \[PATCH\] $reponame: \2#" $patchfile | ||
| 18 | if grep -q '^Signed-off-by:' $patchfile; then | ||
| 19 | # Insert before Signed-off-by. | ||
| 20 | sed -i -e "0,/^Signed-off-by:/s#\(^Signed-off-by:.*\)#\(From $reponame rev: $rev\)\n\n\1#" $patchfile | ||
| 21 | else | ||
| 22 | # Insert before final --- separator, with extra blank lines removed. | ||
| 23 | perl -e "\$_ = join('', <>); s/^(.*\S[ \t]*)(\n|\n\s*\n)---\n/\$1\n\nFrom $reponame rev: $rev\n---\n/s; print;" $patchfile >$patchfile.tmp | ||
| 24 | mv $patchfile.tmp $patchfile | ||
| 25 | fi | ||
