[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Quilt-dev] [PATCH] Fix handling of patch files with ':' in their na
From: |
Jean Delvare |
Subject: |
Re: [Quilt-dev] [PATCH] Fix handling of patch files with ':' in their name. |
Date: |
Tue, 04 Dec 2012 15:16:32 +0100 |
Le mardi 04 décembre 2012 à 09:01 -0500, Benjamin Poirier a écrit :
> On 2012/12/04 10:27, Jean Delvare wrote:
> > --- quilt.orig/quilt/scripts/patchfns.in
> > +++ quilt/quilt/scripts/patchfns.in
> > @@ -88,6 +88,12 @@ quote_re()
> > echo "$1" | sed -e 's:\([][?{(|)}^$/.+*\\]\):\\\1:g'
> > }
> >
> > +# Quote a string for use in a pattern.
> > +quote_pat()
> > +{
> > + echo "$1" | sed -e 's:\([][*?\\]\):\\\1:g'
> > +}
> > +
> > patch_file_name()
> > {
> > echo "$QUILT_PATCHES/$1"
> > @@ -650,8 +656,8 @@ files_in_patch()
> > if [ -d "$path" ]
> > then
> > find "$path" -type f \
> > - -a ! -path "$path/.timestamp" |
> > - sed -e "s:$path/::"
> > + -a ! -path "$(quote_pat $path)/.timestamp" |
>
> Do not forget to quote $path, else bash will perform word splitting and
> munge spaces.
Doh, thanks for the review. I've been adding missing quotes all
afternoon long just to forget them in my own code...
I'll commit this later today.
--
Jean Delvare
Suse L3
Re: [Quilt-dev] [PATCH] Fix handling of patch files with ':' in their name., Martin Quinson, 2012/12/02