Fix C installation script Support symbolic links in man page destination directory.
Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/74c68d92 Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/74c68d92 Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/74c68d92 Branch: refs/heads/master Commit: 74c68d925336af07079b6ed012cb74b2d5e345ba Parents: f21359f Author: Nick Wellnhofer <[email protected]> Authored: Sat Jul 11 17:30:32 2015 +0200 Committer: Nick Wellnhofer <[email protected]> Committed: Sat Jul 11 17:30:32 2015 +0200 ---------------------------------------------------------------------- runtime/c/install.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/74c68d92/runtime/c/install.sh ---------------------------------------------------------------------- diff --git a/runtime/c/install.sh b/runtime/c/install.sh index ae9d04c..64a8496 100755 --- a/runtime/c/install.sh +++ b/runtime/c/install.sh @@ -103,7 +103,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"
