3 # Install a man page, but fixing up paths as we go. All of the man pages
4 # are written to use the Transarc paths, and this script fixes those paths to
5 # be correct for the chosen configure options as the man pages are installed.
6 # Takes the source man page file and the destination path as arguments.
13 install=@TOP_OBJDIR@/src/pinstall/pinstall
15 # We have to include all of the variables here since several of them refer to
16 # each other and this is the only way we get them all expanded.
18 exec_prefix=@exec_prefix@
19 datarootdir=@datarootdir@
21 includedir=@includedir@
23 libexecdir=@libexecdir@
24 localstatedir=@localstatedir@
27 sysconfdir=@sysconfdir@
28 afsbackupdir=@afsbackupdir@
29 afsbosconfigdir=@afsbosconfigdir@
30 afsconfdir=@afsconfdir@
32 afslocaldir=@afslocaldir@
33 afslogsdir=@afslogsdir@
34 afssrvbindir=@afssrvbindir@
35 afskerneldir=@afskerneldir@
36 afssrvlibexecdir=@afssrvlibexecdir@
37 afssrvsbindir=@afssrvsbindir@
38 viceetcdir=@viceetcdir@
40 # Substitute the paths into a local temporary file and then install it with
42 sed -e "s%/usr/afs/local/BosConfig%${afsbosconfigdir}/BosConfig%g" \
43 -e "s%/usr/afs/etc%${afsconfdir}%g" \
44 -e "s%/usr/afs/backup%${afsbackupdir}%g" \
45 -e "s%/usr/afs/bin%${afssrvlibexecdir}%g" \
46 -e "s%/usr/afs/db%${afsdbdir}%g" \
47 -e "s%/usr/afs/local%${afslocaldir}%g" \
48 -e "s%/usr/afs/logs%${afslogsdir}%g" \
49 -e "s%/usr/vice/etc%${viceetcdir}%g" "$manpage" > "$manpage".tmp
50 $install -c -f -m 0644 "$manpage".tmp "$dest"