Not all commits in meta-tizen have a Signed-of-by tag. If missing,
just append the rev number at the end of the commit message.
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
# prefix.
sed -i -e "s#Subject: \[PATCH\] \(.*\)#Subject: \[PATCH\] meta-tizen: \1#" $patchfile
-sed -i -e "0,/^Signed-off-by:/s#\(^Signed-off-by:.*\)#\(From meta-tizen rev: $rev\)\n\n\1#" $patchfile
+if grep -q '^Signed-off-by:' $patchfile; then
+ sed -i -e "0,/^Signed-off-by:/s#\(^Signed-off-by:.*\)#\(From meta-tizen rev: $rev\)\n\n\1#" $patchfile
+else
+ sed -i -e "0,/^---$/s#^---\$#\(From meta-tizen rev: $rev\)\n---#" $patchfile
+fi