[oe-commits] Patrick Ohly : combo-layer-hook-default.sh: avoid duplicating prefix

git at git.openembedded.org git at git.openembedded.org
Fri Mar 20 10:59:16 UTC 2015


Module: openembedded-core.git
Branch: master-next
Commit: 10fe886106154d0cc4e25d77b7885cce3c3b15e0
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=10fe886106154d0cc4e25d77b7885cce3c3b15e0

Author: Patrick Ohly <patrick.ohly at intel.com>
Date:   Fri Mar 13 12:51:54 2015 +0100

combo-layer-hook-default.sh: avoid duplicating prefix

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.

Signed-off-by: Patrick Ohly <patrick.ohly at intel.com>
Signed-off-by: Ross Burton <ross.burton at intel.com>

---

 scripts/combo-layer-hook-default.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/combo-layer-hook-default.sh b/scripts/combo-layer-hook-default.sh
index 8b148ac..9dd5aed 100755
--- a/scripts/combo-layer-hook-default.sh
+++ b/scripts/combo-layer-hook-default.sh
@@ -9,5 +9,5 @@ patchfile=$1
 rev=$2
 reponame=$3
 
-sed -i -e "s#^Subject: \[PATCH\] \(.*\)#Subject: \[PATCH\] $reponame: \1#" $patchfile
+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



More information about the Openembedded-commits mailing list