Commit 5bf8112a authored by Mike Frysinger's avatar Mike Frysinger

man: improve install

Avoid using `ls` to get the file list as its behavior can be changed
by env vars.  Using shell globs instead should be much more stable.

Also check the exit value of the install command itself and abort if
we fail to install a man page.
parent e1ce9420
......@@ -57,11 +57,10 @@ install:
else \
MAN_DIR=${BASEDIR}${mandir}/$$LANG/man$$SECTION; \
fi ; \
CMDS=`ls *.$$SECTION`; \
[ -z "$$CMDS" ] && continue; \
$(INSTALL) -d -m 755 $$MAN_DIR; \
for CMD in $$CMDS; do \
$(INSTALL) -m 644 $$CMD $$MAN_DIR; \
for CMD in *.$$SECTION; do \
[ -e $$CMD ] || continue; \
$(INSTALL) -m 644 $$CMD $$MAN_DIR || exit 1; \
done; \
done; \
cd ..; \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment