oe-layersetup.sh: Fix printf error if repo uri has space
PATCH 1/1 oe-layersetup.sh: Fix printf error if repo uri has space
If repo uri has space, then url will have '%20'
and script gives follwoing error
bash: printf: 'M': invalid format character
Signed-off-by Ankur Tyagi <[email protected]>
--- oe-layertool-setup.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
oe-layertool-setup.sh +3 -3
@@ -276,12 +276,12 @@ configure_repo() { # Check if the repo with $name was already seen. Use the , at the end # of the grep to avoid matching similar named repos. - temp=`printf "$output\n" | grep -e "^$name,"` + temp=`printf '%s\n' $output | grep -e "^$name,"` if [ "x$temp" != "x" ] then echo "This repository ($name) has already been configured with the following values:" - printf "\t$temp\n" + printf '\t%s\n' $temp echo "Skipping configuring duplicate repository" return 1 fi
@@ -928,7 +928,7 @@ then then mkdir -p $dir fi - printf "$output\n" > $outputfile + printf '%s\n' $output > $outputfile echo "Output file is $outputfile" fi
Signature · 1 line
2.17.1
ping
regards
Ankur
Quoted 41 lines · Ankur Tyagi
If repo uri has space, then url will have '%20'
and script gives follwoing error
bash: printf: 'M': invalid format characterSigned-off-by Ankur Tyagi <[email protected]>--- oe-layertool-setup.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)oe-layertool-setup.sh +3
-4@@ -276,12 +276,12 @@ configure_repo() { # Check if the repo with $name was already seen. Use the , at the end # of the grep to avoid matching similar named repos. - temp=`printf "$output\n" | grep -e "^$name,"` + temp=`printf '%s\n' $output | grep -e "^$name,"` if [ "x$temp" != "x" ] then echo "This repository ($name) has already been configured with the following values:" - printf "\t$temp\n" + printf '\t%s\n' $temp echo "Skipping configuring duplicate repository" return 1 fi@@ -928,7 +928,7 @@ then then mkdir -p $dir fi - printf "$output\n" > $outputfile + printf '%s\n' $output > $outputfile echo "Output file is $outputfile" fi --2.17.1
Denys Dmytriyenko
AppliedMerged, thanks!
Quoted 51 lines · Ankur Tyagi
ping
regards
AnkurQuoted 39 lines · Ankur Tyagi
If repo uri has space, then url will have '%20'
and script gives follwoing error
bash: printf: 'M': invalid format characterSigned-off-by Ankur Tyagi <[email protected]>--- oe-layertool-setup.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)oe-layertool-setup.sh +3
-4@@ -276,12 +276,12 @@ configure_repo() { # Check if the repo with $name was already seen. Use the , at the end # of the grep to avoid matching similar named repos. - temp=`printf "$output\n" | grep -e "^$name,"` + temp=`printf '%s\n' $output | grep -e "^$name,"` if [ "x$temp" != "x" ] then echo "This repository ($name) has already been configured with the following values:" - printf "\t$temp\n" + printf '\t%s\n' $temp echo "Skipping configuring duplicate repository" return 1 fi@@ -928,7 +928,7 @@ then then mkdir -p $dir fi - printf "$output\n" > $outputfile + printf '%s\n' $output > $outputfile echo "Output file is $outputfile" fi --Quoted 2 lines
2.17.1
_______________________________________________
meta-arago mailing list
[email protected]
http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago