[Nagiosplug-devel] doc/makefile

Thomas Guyot-Sionnest dermoth at aei.ca
Thu Feb 8 06:10:50 CET 2007


Looking at an error message, I realized that in doc/makefile there's
some shell code that seems useless... It's:

  if [[ -e developer-guidelines/developer-guidelines.html ]] ; then \
    mv developer-guidelines/developer-guidelines.html . ;\
    rm -f developer-guidelines ;\
  fi

[[ is BASH syntax. Since it's getting run by /bin/sh, and on my system
(latest Ubuntu) /bin/sh is the BSD SHell, [[ return an error. I don't
see any reason to use [[ instead of [. The other weird thing there is the:

    rm -f developer-guidelines

Since developer-guidelines is supposed to be a directory it doesn't
remove it and print an error instead. I'm not sure if other UNIX
implementations of rm would remove it, but since /bin/sh needs to be GNU
BASH it would be odd that the rest even runs on a non-GNU system :/

Should I fix that code or remove it? On my system it's creating the html
file in the same directory; I'm wondering if it's different on other
systems...

Thomas




More information about the Devel mailing list