bashisms in and usage of realpath


running ./ I get

  sh: 1: [[: not found

during autoreconf. Culprit is

m4_define([nm_git_sha], [m4_esyscmd([ ( [[ -d ./.git/ && "$(realpath
./.git/)" = "$(realpath "$(git rev-parse --git-dir 2>/dev/null)"
2>/dev/null)" ]] && git rev-parse --verify -q HEAD 2>/dev/null ) || true

[[ ]] is a bashism. Fixing that to use [ ] && [ ] I encounter another error:

  sh: 1: realpath: not found

The realpath utility is not installed by default on Debian systems.
It would probably be better to use readlink -f here, since that is part
of coreutils and installed by default.

I'm not sure what the check is supposed to achieve, but the attached
patch fixes the errors for me.

Please review.


Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?

Description: Text Data

Attachment: signature.asc
Description: OpenPGP digital signature

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]