From: Dan Timoney Date: Thu, 9 Apr 2020 18:46:31 +0000 (-0400) Subject: Updated script to handle sed issues X-Git-Tag: 2.0.0~10 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=8ca0f1f6154f7ef79769af538851c601dbc4f1e1;p=ccsdk%2Fparent.git Updated script to handle sed issues The 'sed' line added to the updParentVersion script introduced 2 problems: 1) sed inline edit (-i option) saves a backup copy unless you pass the empty string ('') as the suffix , which is the arg to the -i option. 2) BSD sed (e.g. the version installed in Mac OSX) does not support \n as newline in replacement strings. The more portable solution is to simply escape a literal newline in the replacement string. Change-Id: Ia3a3b2635b8cc9ce57ec41c2e55c1384587325c7 Issue-ID: CCSDK-2308 Signed-off-by: Dan Timoney --- diff --git a/tools/updParentVersion.sh b/tools/updParentVersion.sh index 28e5bdb7..4f627db4 100755 --- a/tools/updParentVersion.sh +++ b/tools/updParentVersion.sh @@ -41,4 +41,6 @@ fi find $1 -name pom.xml -exec bash -c 'updatePom "$0" $1' '{}' \; #Adding single empty line before project tag if there is a header available -find $1 -name pom.xml -exec sed -i -n '$!N;s@-->\n\n\n\n\ +\ +