root/foundation-apps/mxterm-maxx/minstall.sh

Revision 8, 1.2 KB (checked in by emasson, 3 years ago)

initial import for the community edition

Line 
1#!/bin/sh
2# $XTermId: minstall.sh,v 1.13 2008/01/27 15:45:03 tom Exp $
3#
4# Install manpages, substituting a reasonable section value since XFree86 4.x
5# and derived imakes do not use constants...
6#
7# Parameters:
8#       $1 = program to invoke as "install"
9#       $2 = manpage to install
10#       $3 = final installed-path
11#       $4 = app-defaults directory
12#
13
14# override locale...
15LANG=C;         export LANG
16LANGUAGE=C;     export LANGUAGE
17LC_ALL=C;       export LC_ALL
18LC_CTYPE=C;     export LC_CTYPE
19XTERM_LOCALE=C  export XTERM_LOCALE
20
21# these could interfere with the "man" command.
22unset MANPAGER
23unset PAGER
24
25# get parameters
26MINSTALL="$1"
27OLD_FILE="$2"
28END_FILE="$3"
29APPS_DIR="$4"
30
31suffix=`echo "$END_FILE" | sed -e 's%^.*\.%%'`
32NEW_FILE=temp$$
33
34MY_MANSECT=$suffix
35
36# "X" is usually in the miscellaneous section, along with "undocumented".
37# Use that to guess an appropriate section.
38X_MANSECT=`man X 2>&1 | tr '\012' '\020' | sed -e 's/^[^0123456789]*\([^) ][^) ]*\).*/\1/'`
39test -z "$X_MANSECT" && X_MANSECT=$suffix
40
41sed     -e 's%__vendorversion__%"X Window System"%' \
42        -e s%__apploaddir__%$APPS_DIR% \
43        -e s%__mansuffix__%$MY_MANSECT%g \
44        -e s%__miscmansuffix__%$X_MANSECT%g \
45        $OLD_FILE >$NEW_FILE
46
47echo "$MINSTALL $OLD_FILE $END_FILE"
48eval "$MINSTALL $NEW_FILE $END_FILE"
49
50rm -f $NEW_FILE
Note: See TracBrowser for help on using the browser.