mirror of
https://git.openafs.org/openafs.git
synced 2025-01-19 15:30:14 +00:00
5fde299434
On installation, substitute the configured paths into the man pages, replacing the Transarc paths. Also fix a problem with the way that pinstall was being used to install man pages. (Silly me, I was assuming it had the same behavior as install.) This is just a quick first pass. Longer term, it's probably better to replace all paths in the man pages with unambiguous tokens and then replace those tokens instead of assuming that the man pages use Transarc paths and replacing those paths specifically. The current method has a few minor problems, such as not being able to distinguish between the various paths that make up /usr/afs/bin. Still, the results of this method are good enough to start with.
51 lines
1.6 KiB
Bash
51 lines
1.6 KiB
Bash
#!/bin/sh
|
|
#
|
|
# Install a man page, but fixing up paths as we go. All of the man pages
|
|
# are written to use the Transarc paths, and this script fixes those paths to
|
|
# be correct for the chosen configure options as the man pages are installed.
|
|
# Takes the source man page file and the destination path as arguments.
|
|
|
|
set -e
|
|
|
|
manpage="$1"
|
|
dest="$2"
|
|
|
|
install=@TOP_OBJDIR@/src/pinstall/pinstall
|
|
|
|
# We have to include all of the variables here since several of them refer to
|
|
# each other and this is the only way we get them all expanded.
|
|
prefix=@prefix@
|
|
exec_prefix=@exec_prefix@
|
|
bindir=@bindir@
|
|
includedir=@includedir@
|
|
libdir=@libdir@
|
|
libexecdir=@libexecdir@
|
|
localstatedir=@localstatedir@
|
|
mandir=@mandir@
|
|
sbindir=@sbindir@
|
|
sysconfdir=@sysconfdir@
|
|
afsbackupdir=@afsbackupdir@
|
|
afsbosconfigdir=@afsbosconfigdir@
|
|
afsconfdir=@afsconfdir@
|
|
afsdbdir=@afsdbdir@
|
|
afslocaldir=@afslocaldir@
|
|
afslogsdir=@afslogsdir@
|
|
afssrvbindir=@afssrvbindir@
|
|
afskerneldir=@afskerneldir@
|
|
afssrvlibexecdir=@afssrvlibexecdir@
|
|
afssrvsbindir=@afssrvsbindir@
|
|
viceetcdir=@viceetcdir@
|
|
|
|
# Substitute the paths into a local temporary file and then install it with
|
|
# $install.
|
|
sed -e "s%/usr/afs/local/BosConfig%${afsbosconfigdir}/BosConfig%g" \
|
|
-e "s%/usr/afs/etc%${afsconfdir}%g" \
|
|
-e "s%/usr/afs/backup%${afsbackupdir}%g" \
|
|
-e "s%/usr/afs/bin%${afssrvlibexecdir}%g" \
|
|
-e "s%/usr/afs/db%${afsdbdir}%g" \
|
|
-e "s%/usr/afs/local%${afslocaldir}%g" \
|
|
-e "s%/usr/afs/logs%${afslogsdir}%g" \
|
|
-e "s%/usr/vice/etc%${viceetcdir}%g" "$manpage" > "$manpage".tmp
|
|
$install -c -f -m 0644 "$manpage".tmp "$dest"
|
|
rm "$manpage".tmp
|