Fix C installation script Support symbolic links in man page destination directory.
Project: http://git-wip-us.apache.org/repos/asf/lucy/repo Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/739bc635 Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/739bc635 Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/739bc635 Branch: refs/heads/master Commit: 739bc635dd08f7290396d9accc3f2ee792b2eea3 Parents: 2c58db8 Author: Nick Wellnhofer <[email protected]> Authored: Sat Jul 11 17:56:27 2015 +0200 Committer: Nick Wellnhofer <[email protected]> Committed: Sat Jul 11 17:56:27 2015 +0200 ---------------------------------------------------------------------- c/install.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucy/blob/739bc635/c/install.sh ---------------------------------------------------------------------- diff --git a/c/install.sh b/c/install.sh index 5909d33..44f5345 100755 --- a/c/install.sh +++ b/c/install.sh @@ -99,7 +99,14 @@ for src in `find ../core -name '*.cf[hp]'`; do done # Install man pages. -cp -R autogen/man "$prefix" +mkdir -p "$prefix/man" +# Resolve symbolic links. +man_dir=$(cd "$prefix/man" && pwd -P) +if [ -n "$man_dir" ]; then + cp -R autogen/man "$man_dir" +else + echo "Warning: Invalid directory $prefix/man" +fi # Create pkg-config file. mkdir -p "$prefix/lib/pkgconfig"
