summaryrefslogtreecommitdiff
path: root/scripts/combo-layer-hook-default.sh
blob: 46f2b70fc46b3606199b759aa40d4470448fca1d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/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 "0,/^Subject:/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