On 05/29/2017 10:46 AM, Max Reitz wrote: >> If you switch all of these to $(realpath -- "$(type -p "$QEMU_...")"), >> you can add: > > I'd love to, but this is what type -p outputs for me: > > $ type -p qemu-img > qemu-img is /usr/bin/qemu-img
Huh? That's plain 'type' output. Are you sure you're testing 'type -p'? $ PATH=$PATH # to forcefully clear bash's cache $ type qemu-img qemu-img is /usr/bin/qemu-img $ type -p qemu-img /usr/bin/qemu-img $ qemu-img --help >/dev/null # to repopulate qemu-img into the cache $ type qemu-img qemu-img is hashed (/usr/bin/qemu-img) $ type -p qemu-img /usr/bin/qemu-img > > So I would need to parse the result (and it depends on the locale). If > that is indeed so, I'd rather stay with which, to be honest... Plain 'type' does have to be parsed, but 'type -p' is required to be machine-usable. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature