tools/python: Fix install-wrap
authorAnthony PERARD <anthony.perard@citrix.com>
Wed, 11 Mar 2020 17:59:32 +0000 (17:59 +0000)
committerWei Liu <wl@xen.org>
Tue, 19 May 2020 10:40:50 +0000 (11:40 +0100)
This allows to use install-wrap when the source scripts is in a
subdirectory.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Wei Liu <wl@xen.org>
tools/python/install-wrap

index 00e2014016f9cdd55c7f6ac32b068e6fb84f9a0e..fef24e01708d763fa80e0c82d1e0739ae5261f04 100755 (executable)
@@ -44,7 +44,7 @@ shift
 destf="$dest"
 for srcf in ${srcs}; do
        if test -d "$dest"; then
-               destf="$dest/${srcf%%*/}"
+               destf="$dest/${srcf##*/}"
        fi
        org="$(sed -n '2q; /^#! *\/usr\/bin\/env python *$/p' $srcf)"
        if test "x$org" = x; then