Browse Source

distro/redhat: spec syntax error if texi2html not installed

* redhat/quagga.spec.in: If texi2html is not installed you get a confusing
  error about a syntax issue in an %if statement, far from the problem.
  Fix.
Paul Jakma 5 years ago
parent
commit
9e31fbc996
1 changed files with 1 additions and 1 deletions
  1. 1 1
      redhat/quagga.spec.in

+ 1 - 1
redhat/quagga.spec.in

@@ -46,7 +46,7 @@
 
 #### Check version of texi2html 
 # Old versions don't support "--number-footnotes" option.
-%{expand: %%global texi2htmlversion %(rpm -q --qf '%%{VERSION}' texi2html | cut -d. -f1 )}
+%{expand: %%global texi2htmlversion %(type texi2html >/dev/null 2>&1 && (rpm -q --qf '%%{VERSION}' texi2html | cut -d. -f1) || echo 0 )}
 
 #### Check for systemd or init.d (upstart)
 # Check for init.d (upstart) as used in CentOS 6 or systemd (ie CentOS 7)