 
	
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [XEN PATCH 1/2] tools/python: Fix install-wrap
 On Wed, Mar 11, 2020 at 05:59:32PM +0000, Anthony PERARD wrote:
> This allows to use install-wrap when the source scripts is in a
> subdirectory.
> 
> Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
> ---
>  tools/python/install-wrap | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/python/install-wrap b/tools/python/install-wrap
> index 00e2014016f9..fef24e01708d 100755
> --- a/tools/python/install-wrap
> +++ b/tools/python/install-wrap
> @@ -44,7 +44,7 @@ shift
>  destf="$dest"
>  for srcf in ${srcs}; do
>       if test -d "$dest"; then
> -             destf="$dest/${srcf%%*/}"
> +             destf="$dest/${srcf##*/}"
This seems to have changed the pattern from "Remove Largest Suffix" to
"Remove Largest Prefix".
What does it do in practice?
For POSIX sh
x=posix/src/std
echo ${x%%*/} -> posix/src/std
echo ${x##*/} -> std
I would think the former is what you want. But I could be missing
something obvious.
Wei.
>       fi
>       org="$(sed -n '2q; /^#! *\/usr\/bin\/env python *$/p' $srcf)"
>       if test "x$org" = x; then
> -- 
> Anthony PERARD
> 
 
 | 
|  | Lists.xenproject.org is hosted with RackSpace, monitoring our |