On SUSE 'which' returns always the full path of (shell) commands and
not e.g. './ceph-conf' as on Debian. Add check also for full
path returned by which.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
(cherry picked from commit
39530536ff923b91899f6303507c283b78040a20)
function command_fixture() {
local command=$1
- [ $(which $command) = ./$command ] || return 1
+ [ $(which $command) = ./$command ] || [ $(which $command) = $(pwd)/$command ] || return 1
cat > $DIR/$command <<EOF
#!/bin/bash