* [oe-layersetup][PATCH] oe-layersetup.sh: Fix printf error if repo uri has space
@ 2019-07-25 5:27 Ankur Tyagi
2019-07-28 10:21 ` Ankur Tyagi
0 siblings, 1 reply; 3+ messages in thread
From: Ankur Tyagi @ 2019-07-25 5:27 UTC (permalink / raw)
To: meta-arago
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 <ankur.tyagi85@gmail.com>
---
oe-layertool-setup.sh | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/oe-layertool-setup.sh b/oe-layertool-setup.sh
index 5a0175d..d14ed4f 100755
--- a/oe-layertool-setup.sh
+++ b/oe-layertool-setup.sh
@@ -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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [oe-layersetup][PATCH] oe-layersetup.sh: Fix printf error if repo uri has space
2019-07-25 5:27 [oe-layersetup][PATCH] oe-layersetup.sh: Fix printf error if repo uri has space Ankur Tyagi
@ 2019-07-28 10:21 ` Ankur Tyagi
2019-07-30 18:05 ` Denys Dmytriyenko
0 siblings, 1 reply; 3+ messages in thread
From: Ankur Tyagi @ 2019-07-28 10:21 UTC (permalink / raw)
To: meta-arago
ping
regards
Ankur
On Thu, Jul 25, 2019 at 5:27 PM Ankur Tyagi <ankur.tyagi85@gmail.com> wrote:
>
> 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 <ankur.tyagi85@gmail.com>
> ---
> oe-layertool-setup.sh | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/oe-layertool-setup.sh b/oe-layertool-setup.sh
> index 5a0175d..d14ed4f 100755
> --- a/oe-layertool-setup.sh
> +++ b/oe-layertool-setup.sh
> @@ -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
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [oe-layersetup][PATCH] oe-layersetup.sh: Fix printf error if repo uri has space
2019-07-28 10:21 ` Ankur Tyagi
@ 2019-07-30 18:05 ` Denys Dmytriyenko
0 siblings, 0 replies; 3+ messages in thread
From: Denys Dmytriyenko @ 2019-07-30 18:05 UTC (permalink / raw)
To: Ankur Tyagi; +Cc: meta-arago
Merged, thanks!
On Sun, Jul 28, 2019 at 10:21:46PM +1200, Ankur Tyagi wrote:
> ping
>
> regards
> Ankur
>
> On Thu, Jul 25, 2019 at 5:27 PM Ankur Tyagi <ankur.tyagi85@gmail.com> wrote:
> >
> > 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 <ankur.tyagi85@gmail.com>
> > ---
> > oe-layertool-setup.sh | 6 +++---
> > 1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/oe-layertool-setup.sh b/oe-layertool-setup.sh
> > index 5a0175d..d14ed4f 100755
> > --- a/oe-layertool-setup.sh
> > +++ b/oe-layertool-setup.sh
> > @@ -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
> >
> _______________________________________________
> meta-arago mailing list
> meta-arago@arago-project.org
> http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-07-30 18:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-25 5:27 [oe-layersetup][PATCH] oe-layersetup.sh: Fix printf error if repo uri has space Ankur Tyagi
2019-07-28 10:21 ` Ankur Tyagi
2019-07-30 18:05 ` Denys Dmytriyenko
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.