Debian Codegraph @

texmf-dist/doc/generic/xypic/support/install-tds

raw symbols SCIP
1 #!/bin/shscip-shell filesystem . . `/bin/sh`.
2 # $Id: install-tds,v 3.16 2011/03/14 20:14:00 krisrose Exp $
3 #
4 # sh(1) installation of Xy-pic into a TeX Directory Structure system.
5 # Copyright (c) 1997 Kristoffer H. Rose <[email protected]>
6 #
7 # This file is part of the Xy-pic macro package.
8 # Copyright (c) 1991-2011 Kristoffer H. Rose <[email protected]>
9 # See the README and INSTALL files for further information.
10 #
11 # The Xy-pic package is free software; you can redistribute it and/or modify
12 # it under the terms of the GNU General Public License as published by the
13 # Free Software Foundation; either version 2 of the License, or (at your
14 # option) any later version.
15 #
16 # The Xy-pic package is distributed in the hope that it will be useful, but
17 # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
18 # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19 # for more details.
20 #
21 # You should have received a copy of the GNU General Public License along
22 # with this package; if not, see http://www.gnu.org/licenses/.
23
24 # check that we are in the right place (and get version :)
25
26 # greet
27 echoscip-shell system . . echo. ''
28 echoscip-shell system . . echo. ' Welcome to the Xy-pic TDS-compliant installation script!'
29 echoscip-shell system . . echo. ' Copyright (c) 1997-1998 by [email protected]'
30 echoscip-shell system . . echo. ' Xy-pic is free software: see the User's Guide for details.'
31 echo ''
32 echo ' The author has seriously tried to ensure the portability of'
33 echo ' this script among all un*x platforms, however, if you experience'
34 echo ' problems then don't hesitate to contact me.'
35 echoscip-shell system . . echo. ''
36 echoscip-shell system . . echo. ' See the file INSTALL for details about what this script does.'
37
38 # record the argument as TEXMF
39 : ${TEXMF:=$1}
40
41 # if no TEXMF specified try to figure it out
42 : ${TEXMF:=`kpsewhich --expand-var='$TEXMFMAIN' 2>/dev/nullscip-shell filesystem . . `/dev/null`.`}
43 : ${TEXMF:=`kpsexpand '$TEXMFMAIN' 2>/dev/nullscip-shell filesystem . . `/dev/null`.`}
44 : ${TEXMF:=`kpsewhich --expand-var='$TEXMF' 2>/dev/nullscip-shell filesystem . . `/dev/null`.`}
45 : ${TEXMF:=`kpsexpand '$TEXMF' 2>/dev/nullscip-shell filesystem . . `/dev/null`.`}
46
47 if [scip-shell system . . `[`. -d "$TEXMF" ]
48 then
49 echoscip-shell system . . echo. ''
50 echoscip-shell system . . echo. "TEXMF directory $TEXMF found."
51 else
52 echoscip-shell system . . echo. ''
53 echoscip-shell system . . echo. 'ERROR: I could not find the TEXMF directory (tried '"$TEXMF"')!' >&2
54 echoscip-shell system . . echo. 'Usage: ./support/install-tds [TEXMF]' >&2
55 echoscip-shell system . . echo. 'Xy-pic installation aborted.'
56 exit 2
57 fi
58
59 # get confirmation
60 echoscip-shell system . . echo. ''
61 echoscip-shell system . . echo. ' This script will install Xy-pic under the indicated TEXMF tree.'
62 echoscip-shell system . . echo. ' We assume that it is the root of a standard TeX Directory Structure.'
63 echoscip-shell system . . echo. ''
64 echoscip-shell system . . echo. ' Also we asume that the commands find, grep, mkdir, and cp, conform'
65 echoscip-shell system . . echo. ' to their POSIX specification and can be found in the standard path.'
66 echoscip-shell system . . echo. ''
67 echoscip-shell system . . echo. 'Type <enter> to continue (anything else to stop - this is your last chance):'
68 read reply
69 if [scip-shell system . . `[`. -z "$reply" ];
70 then
71 echoscip-shell system . . echo. ''
72 echoscip-shell system . . echo. 'Thanks: proceeding with the installation.'
73 else
74 echoscip-shell system . . echo. 'Xy-pic installation aborted.'
75 exit 1
76 fi
77
78 # warn user about obsolete files
79 echoscip-shell system . . echo. ''
80 echoscip-shell system . . echo. 'Checking for obsolete files.'
81 if [scip-shell system . . `[`. -d "$TEXMF/dvips/xypic" ]
82 then
83
84 files=`findscip-shell system . . find. "$TEXMF/dvips" -name "xy*.map" -print 2>/dev/nullscip-shell filesystem . . `/dev/null`.`
85 if [scip-shell system . . `[`. -n "$files" ]
86 then
87 echoscip-shell system . . echo. 'WARNING: xy*.map files exist:'
88 echoscip-shell system . . echo. $files
89 fi
90
91 files=`findscip-shell system . . find. "$TEXMF/dvips" -name psfonts.map -print 2>/dev/nullscip-shell filesystem . . `/dev/null`.`
92 files=`grepscip-shell system . . grep. -svl '^xy' $files /dev/nullscip-shell filesystem . . `/dev/null`.`
93 if [scip-shell system . . `[`. -n "$files" ]
94 then
95 echoscip-shell system . . echo. 'WARNING: psfonts.map xy*-font mappings exist in:'
96 echoscip-shell system . . echo. "$files"
97 fi
98
99 files=`findscip-shell system . . find. "$TEXMF/fonts/type1" -name "xy*.pf?" -print 2>/dev/nullscip-shell filesystem . . `/dev/null`. \
100 | grepscip-shell system . . grep. -v "$TEXMF/fonts/type1/public/xypic/xy.*[.]pfb"`
101 if [scip-shell system . . `[`. -n "$files" ]
102 then
103 echoscip-shell system . . echo. 'WARNING: xy*.pfa or xy*.pfb files exist:'
104 echoscip-shell system . . echo. "$files"
105 fi
106
107 fi
108
109 # function for installing simple files in a directory
110 installdscip-shell shell texlive-base 2026.20260527-3 installd(). () {
111 text=$1; shift
112 dir=`eval 'echo ${'$#'}'` # extract last parameter
113 echoscip-shell system . . echo. "Installing $text in $dir."
114 if mkdirscip-shell system . . mkdir. -p "$dir"; then cpscip-shell system . . cp. -f "$@"
115 else
116 echoscip-shell system . . echo. ' WARNING: could not make directory - files not installed.'
117 fi
118 }
119
120 # do the actual installation
121 echoscip-shell system . . echo. ''
122 echoscip-shell system . . echo. 'Installing Xy-pic...'
123
124 installdscip-shell shell texlive-base 2026.20260527-3 installd(). "1. administrivia" \
125 README CATALOG TRAILER INSTALL MANIFEST VERSIONS *COPYING \
126 Xy-pic.html Xy-logo.png \
127 "$TEXMF/doc/generic/xypic"
128 installdscip-shell shell texlive-base 2026.20260527-3 installd(). "2. macros" texinputs/* "$TEXMF/tex/generic/xypic"
129 installdscip-shell shell texlive-base 2026.20260527-3 installd(). "3. font metrics" texfonts/*.tfm "$TEXMF/fonts/tfm/public/xypic"
130 installdscip-shell shell texlive-base 2026.20260527-3 installd(). "4. font sources" mfinputs/*.mf "$TEXMF/fonts/source/public/xypic"
131 installdscip-shell shell texlive-base 2026.20260527-3 installd(). "5. ps type1 fonts" type1/*.pfb "$TEXMF/fonts/type1/public/xypic"
132 installdscip-shell shell texlive-base 2026.20260527-3 installd(). "6. ps pfm fonts" pfm/*.pfm "$TEXMF/fonts/pfm/public/xypic"
133 installdscip-shell shell texlive-base 2026.20260527-3 installd(). "7. afm metrics" afm/*.afm "$TEXMF/fonts/afm/public/xypic"
134 installdscip-shell shell texlive-base 2026.20260527-3 installd(). "8. ps headers" ps/* "$TEXMF/dvips/xypic"
135 installdscip-shell shell texlive-base 2026.20260527-3 installd(). "9. ps font maps" map/* "$TEXMF/fonts/map/dvips/xypic"
136 installdscip-shell shell texlive-base 2026.20260527-3 installd(). "10. ps font encodings" enc/* "$TEXMF/fonts/enc/dvips/xypic"
137 installdscip-shell shell texlive-base 2026.20260527-3 installd(). "11. documentation" doc/xyguide.pdf doc/xyrefer.pdf "$TEXMF/doc/generic/xypic"
138
139 # done
140 echoscip-shell system . . echo. "Xy-pic installation done."
141 exit
142
143 # $Log: install-tds,v $
144 # Revision 3.16 2011/03/14 20:14:00 krisrose
145 # Preparing for release 3.8.6.
146 #
147 # Revision 3.15 2010/07/26 11:21:02 krisrose
148 # 3.8.3 version oopses
149 #
150 # Revision 3.14 2010/07/06 22:43:56 krisrose
151 # Release 3.8.3.
152 #
153 # Revision 3.13 2010/06/10 18:45:49 krisrose
154 # Reference to GPL by URL.
155 #
156 # Revision 3.12 2010/06/08 07:28:43 krisrose
157 # Identify .map file.
158 #
159 # Revision 3.11 2010/06/07 04:16:53 krisrose
160 # Fix forgotten enc files.
161 #
162 # Revision 3.10 2010/05/09 22:11:05 krisrose
163 # Loose /usr/bin prefixes.
164 #
165 # Revision 3.9 2010/04/22 14:52:09 krisrose
166 # Documentation up to date. Install PDF encoding files and XYLU metric files.
167 #
168 # Revision 3.8 2010/04/16 06:06:51 krisrose
169 # Preparing for a new release...
170 #
171 # Revision 3.7 1999/02/16 15:12:50 krisrose
172 # Interim release (Y&Y fonts now free).
173 #
174 # New with release 3.5...changed significantly for 3.6.