On 9/14/20 10:43 AM, Thomas Huth wrote:

+++ b/tests/qemu-iotests/check
@@ -44,7 +44,7 @@ then
          _init_error "failed to obtain source tree name from check symlink"
      fi
      source_iotests=$(cd "$source_iotests"; pwd) || _init_error "failed to enter 
source tree"
-    build_iotests=$(readlink -f $(dirname "$0"))
+    build_iotests=$(cd "$(dirname "$0")"; pwd)

I assume the nested quotes are ok here? ... shell scripts always confuse
me in that regard...

Yes. Anything inside $() is a standalone script. That's one of the reasons that $() is nicer than `` (where you did indeed have to worry about " inside `` interfering with "``" on the outside, in some shells).

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org


Reply via email to