diff options
84 files changed, 1015 insertions, 12661 deletions
diff --git a/Build/source/texk/kpathsea/ChangeLog b/Build/source/texk/kpathsea/ChangeLog index 006b4c30f34..e4d2c91ba00 100644 --- a/Build/source/texk/kpathsea/ChangeLog +++ b/Build/source/texk/kpathsea/ChangeLog @@ -1,3 +1,20 @@ +2019-12-29 Karl Berry <karl@tug.org> + + * mktexlsr, + * mktexmf, + * mktexpk, + * mktextfm: remove; these will now be maintained only in + Master/texmf-dist/scripts/texlive, with slave copies in + Build/source/texk/texlive/linked_scripts as usual. + * Makefile.am (dist_noinst_SCRIPTS): remove, nothing left. + (install-exec-local): likewise remove. + (uninstall-local): don't uninstall the dist_noinst_SCRIPTS. + (bin_links): remove, now also handled in linked_scripts. + + * man/Makefile.am (man_sources): remove mktex{lsr,mf,pk,tfm}.man; + (man1_links): remove; these man pages will now be maintained in + Build/source/texk/texlive/tl_scripts. + 2019-12-26 Karl Berry <karl@tug.org> * Makefile.am (install-data-local): must mkdir web2cdir here. diff --git a/Build/source/texk/kpathsea/Makefile.am b/Build/source/texk/kpathsea/Makefile.am index e4ba90f0335..ebb2c5f2cc8 100644 --- a/Build/source/texk/kpathsea/Makefile.am +++ b/Build/source/texk/kpathsea/Makefile.am @@ -1,7 +1,7 @@ ## $Id$ ## Makefile.am for the TeX Live subdirectory texk/kpathsea/ ## -## Copyright 2017-2019 Karl Berry <tex-live@tug.org> +## Copyright 2015-2019 Karl Berry <tex-live@tug.org> ## Copyright 2009-2015 Peter Breitenlohner <tex-live@tug.org> ## You may freely use, modify and/or distribute this file. @@ -251,21 +251,8 @@ xdirtest_LDADD = libkpathsea.la ## The scripts and their data web2cdir = $(datarootdir)/texmf-dist/web2c -dist_noinst_SCRIPTS = mktexlsr mktexmf mktexpk mktextfm - dist_noinst_DATA = texmf.cnf -install-exec-local: installdirs-am -if !WIN32 - @for f in $(dist_noinst_SCRIPTS); do \ - if grep "original $$f --" "$(DESTDIR)$(bindir)/$$f" >/dev/null 2>&1 \ - || test ! -r "$(DESTDIR)$(bindir)/$$f"; then \ - echo " $(INSTALL_SCRIPT) '$(srcdir)/$$f' '$(DESTDIR)$(bindir)/$$f'"; \ - $(INSTALL_SCRIPT) "$(srcdir)/$$f" "$(DESTDIR)$(bindir)/$$f"; \ - else :; fi; \ - done -endif !WIN32 - install-data-local: installdirs-am $(MKDIR_P) '$(DESTDIR)$(web2cdir)' @for f in $(dist_noinst_DATA); do \ @@ -277,14 +264,6 @@ install-data-local: installdirs-am done uninstall-local: -if !WIN32 - @for f in $(dist_noinst_SCRIPTS); do \ - if grep "original $$f --" "$(DESTDIR)$(bindir)/$$f" >/dev/null 2>&1; then \ - echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ - rm -f "$(DESTDIR)$(bindir)/$$f"; \ - else :; fi; \ - done -endif !WIN32 @for f in $(dist_noinst_DATA); do \ if grep "original $$f --" "$(DESTDIR)$(web2cdir)/$$f" >/dev/null 2>&1; then \ echo " rm -f '$(DESTDIR)$(web2cdir)/$$f'"; \ @@ -292,14 +271,6 @@ endif !WIN32 else :; fi; \ done -bin_links = mktexlsr:texhash - -include $(top_srcdir)/../../am/bin_links.am - -install-exec-hook: install-bin-links - -uninstall-hook: uninstall-bin-links - ## Tests AM_TESTS_ENVIRONMENT = LN_S='$(LN_S)'; export LN_S; AM_TESTS_ENVIRONMENT += LT_OBJDIR='$(LT_OBJDIR)'; export LT_OBJDIR; @@ -325,6 +296,3 @@ rebuild_target = all-am CLEANFILES = include $(srcdir)/../../am/rebuild.am - -## Not used -EXTRA_DIST += mktex.cnf diff --git a/Build/source/texk/kpathsea/Makefile.in b/Build/source/texk/kpathsea/Makefile.in index dd780e2dfd9..c4a4364bcbd 100644 --- a/Build/source/texk/kpathsea/Makefile.in +++ b/Build/source/texk/kpathsea/Makefile.in @@ -17,7 +17,6 @@ - VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ @@ -133,9 +132,8 @@ am__aclocal_m4_deps = $(top_srcdir)/../../m4/kpse-common.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ - $(am__configure_deps) $(dist_noinst_SCRIPTS) \ - $(dist_noinst_DATA) $(kpseinclude_HEADERS) $(noinst_HEADERS) \ - $(am__DIST_COMMON) + $(am__configure_deps) $(dist_noinst_DATA) \ + $(kpseinclude_HEADERS) $(noinst_HEADERS) $(am__DIST_COMMON) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d @@ -250,7 +248,6 @@ progname_test_DEPENDENCIES = libkpathsea.la xdirtest_SOURCES = xdirtest.c xdirtest_OBJECTS = xdirtest.$(OBJEXT) xdirtest_DEPENDENCIES = libkpathsea.la -SCRIPTS = $(dist_noinst_SCRIPTS) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false @@ -576,7 +573,6 @@ am__set_b = \ DIST_SUBDIRS = . doc man win32 am__DIST_COMMON = $(srcdir)/../../am/rebuild.am $(srcdir)/Makefile.in \ $(srcdir)/c-auto.in $(srcdir)/kpathsea.pc.in \ - $(top_srcdir)/../../am/bin_links.am \ $(top_srcdir)/../../build-aux/compile \ $(top_srcdir)/../../build-aux/config.guess \ $(top_srcdir)/../../build-aux/config.sub \ @@ -759,7 +755,7 @@ SUBDIRS = . doc man $(am__append_6) # EXTRA_DIST = PROJECTS putenv.c bsnl.awk cnf-to-paths.awk $(TESTS) \ tests/cnfline/texmf.cnf tests/cnfnewline/texmf.cnf \ - tests/cnfprog/texmf.cnf mktex.cnf + tests/cnfprog/texmf.cnf AM_CPPFLAGS = -I$(top_builddir)/.. -I$(top_srcdir)/.. AM_CFLAGS = $(WARNING_CFLAGS) lib_LTLIBRARIES = libkpathsea.la @@ -858,9 +854,7 @@ progname_test_SOURCES = progname.c progname_test_LDADD = libkpathsea.la xdirtest_LDADD = libkpathsea.la web2cdir = $(datarootdir)/texmf-dist/web2c -dist_noinst_SCRIPTS = mktexlsr mktexmf mktexpk mktextfm dist_noinst_DATA = texmf.cnf -bin_links = mktexlsr:texhash AM_TESTS_ENVIRONMENT = LN_S='$(LN_S)'; export LN_S; \ LT_OBJDIR='$(LT_OBJDIR)'; export LT_OBJDIR; # @@ -879,7 +873,7 @@ all: $(BUILT_SOURCES) c-auto.h .SUFFIXES: .c .lo .log .o .obj .test .test$(EXEEXT) .trs am--refresh: Makefile @: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/../../am/bin_links.am $(srcdir)/../../am/rebuild.am $(am__configure_deps) +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/../../am/rebuild.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ @@ -901,7 +895,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \ esac; -$(top_srcdir)/../../am/bin_links.am $(srcdir)/../../am/rebuild.am $(am__empty): +$(srcdir)/../../am/rebuild.am $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck @@ -2091,8 +2085,8 @@ check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-recursive -all-am: Makefile $(PROGRAMS) $(LTLIBRARIES) $(SCRIPTS) $(DATA) \ - $(HEADERS) c-auto.h +all-am: Makefile $(PROGRAMS) $(LTLIBRARIES) $(DATA) $(HEADERS) \ + c-auto.h install-binPROGRAMS: install-libLTLIBRARIES installdirs: installdirs-recursive @@ -2232,10 +2226,8 @@ install-dvi: install-dvi-recursive install-dvi-am: -install-exec-am: install-binPROGRAMS install-exec-local \ - install-libLTLIBRARIES - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-exec-hook +install-exec-am: install-binPROGRAMS install-libLTLIBRARIES + install-html: install-html-recursive install-html-am: @@ -2343,10 +2335,9 @@ ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-kpseincludeHEADERS \ uninstall-libLTLIBRARIES uninstall-local \ uninstall-nodist_kpseincludeHEADERS uninstall-pkgconfigDATA - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) uninstall-hook + .MAKE: $(am__recursive_targets) all check check-am install install-am \ - install-exec-am install-strip uninstall-am + install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ am--depfiles am--refresh check check-TESTS check-am clean \ @@ -2359,9 +2350,8 @@ uninstall-am: uninstall-binPROGRAMS uninstall-kpseincludeHEADERS \ distuninstallcheck dvi dvi-am html html-am info info-am \ install install-am install-binPROGRAMS install-data \ install-data-am install-data-local install-dvi install-dvi-am \ - install-exec install-exec-am install-exec-hook \ - install-exec-local install-html install-html-am install-info \ - install-info-am install-kpseincludeHEADERS \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-kpseincludeHEADERS \ install-libLTLIBRARIES install-man \ install-nodist_kpseincludeHEADERS install-pdf install-pdf-am \ install-pkgconfigDATA install-ps install-ps-am install-strip \ @@ -2369,7 +2359,7 @@ uninstall-am: uninstall-binPROGRAMS uninstall-kpseincludeHEADERS \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am recheck tags tags-am uninstall \ - uninstall-am uninstall-binPROGRAMS uninstall-hook \ + uninstall-am uninstall-binPROGRAMS \ uninstall-kpseincludeHEADERS uninstall-libLTLIBRARIES \ uninstall-local uninstall-nodist_kpseincludeHEADERS \ uninstall-pkgconfigDATA @@ -2414,15 +2404,6 @@ stamp-kpathsea: Makefile paths.h cp kpathsea.tmp kpathsea.h; \ fi && rm -f kpathsea.tmp && date >$@ -install-exec-local: installdirs-am -@WIN32_FALSE@ @for f in $(dist_noinst_SCRIPTS); do \ -@WIN32_FALSE@ if grep "original $$f --" "$(DESTDIR)$(bindir)/$$f" >/dev/null 2>&1 \ -@WIN32_FALSE@ || test ! -r "$(DESTDIR)$(bindir)/$$f"; then \ -@WIN32_FALSE@ echo " $(INSTALL_SCRIPT) '$(srcdir)/$$f' '$(DESTDIR)$(bindir)/$$f'"; \ -@WIN32_FALSE@ $(INSTALL_SCRIPT) "$(srcdir)/$$f" "$(DESTDIR)$(bindir)/$$f"; \ -@WIN32_FALSE@ else :; fi; \ -@WIN32_FALSE@ done - install-data-local: installdirs-am $(MKDIR_P) '$(DESTDIR)$(web2cdir)' @for f in $(dist_noinst_DATA); do \ @@ -2434,43 +2415,12 @@ install-data-local: installdirs-am done uninstall-local: -@WIN32_FALSE@ @for f in $(dist_noinst_SCRIPTS); do \ -@WIN32_FALSE@ if grep "original $$f --" "$(DESTDIR)$(bindir)/$$f" >/dev/null 2>&1; then \ -@WIN32_FALSE@ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ -@WIN32_FALSE@ rm -f "$(DESTDIR)$(bindir)/$$f"; \ -@WIN32_FALSE@ else :; fi; \ -@WIN32_FALSE@ done @for f in $(dist_noinst_DATA); do \ if grep "original $$f --" "$(DESTDIR)$(web2cdir)/$$f" >/dev/null 2>&1; then \ echo " rm -f '$(DESTDIR)$(web2cdir)/$$f'"; \ rm -f "$(DESTDIR)$(web2cdir)/$$f"; \ else :; fi; \ done - -# $Id$ -# am/bin_links.am: Makefile fragment for bindir links. -.PHONY: install-bin-links uninstall-bin-links - -install-bin-links: -@WIN32_FALSE@ $(MKDIR_P) $(DESTDIR)$(bindir) -@WIN32_FALSE@ @cd $(DESTDIR)$(bindir) && \ -@WIN32_FALSE@ for s in $(bin_links); do \ -@WIN32_FALSE@ link=`echo $$s | sed 's,.*:,,'`; \ -@WIN32_FALSE@ file=`echo $$s | sed 's,:.*,,'`; \ -@WIN32_FALSE@ rm -f $$link; \ -@WIN32_FALSE@ echo "creating link '$$link' -> '$$file'"; \ -@WIN32_FALSE@ $(LN_S) $$file $$link || exit 1; \ -@WIN32_FALSE@ done - -uninstall-bin-links: -@WIN32_FALSE@ @for s in $(bin_links); do \ -@WIN32_FALSE@ link=`echo $$s | sed 's,.*:,,'`; \ -@WIN32_FALSE@ rm -f $(DESTDIR)$(bindir)/$$link; \ -@WIN32_FALSE@ done - -install-exec-hook: install-bin-links - -uninstall-hook: uninstall-bin-links # tests/cnfline.log tests/cnfnewline.log tests/cnfprog.log \ tests/kpsewhich.log: kpsewhich$(EXEEXT) diff --git a/Build/source/texk/kpathsea/man/Makefile.am b/Build/source/texk/kpathsea/man/Makefile.am index ea9e6fe16fc..7e542730067 100644 --- a/Build/source/texk/kpathsea/man/Makefile.am +++ b/Build/source/texk/kpathsea/man/Makefile.am @@ -1,31 +1,18 @@ +## $Id$ ## Makefile.am for the TeX Live subdirectory texk/kpathsea/man/ ## -## Copyright (C) 2009-2013 Peter Breitenlohner <tex-live@tug.org> +## Copyright 2015-2019 Karl Berry <tex-live@tug.org> +## Copyright 2009-2015 Peter Breitenlohner <tex-live@tug.org> ## You may freely use, modify and/or distribute this file. ## man_sources = \ kpseaccess.man \ kpsereadlink.man \ kpsestat.man \ - kpsewhich.man \ - mktexlsr.man \ - mktexmf.man \ - mktexpk.man \ - mktextfm.man + kpsewhich.man EXTRA_DIST = $(man_sources) KPATHSEA_PATHS_H = ${top_builddir}/.. include $(top_srcdir)/../../am/man.am - -# Symlinks within $(man1dir): FILE:LINK indicates LINK.1->FILE.1 -man1_links = \ - mktexlsr:texhash - -include $(top_srcdir)/../../am/man1_links.am - -install-data-hook: install-man1-links - -uninstall-hook: uninstall-man1-links - diff --git a/Build/source/texk/kpathsea/man/Makefile.in b/Build/source/texk/kpathsea/man/Makefile.in index be53fbac19e..4fa5ba71a5a 100644 --- a/Build/source/texk/kpathsea/man/Makefile.in +++ b/Build/source/texk/kpathsea/man/Makefile.in @@ -159,8 +159,7 @@ am__installdirs = "$(DESTDIR)$(man1dir)" NROFF = nroff MANS = $(nodist_man1_MANS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/../../am/man.am \ - $(top_srcdir)/../../am/man1_links.am +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/../../am/man.am DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -288,11 +287,7 @@ man_sources = \ kpseaccess.man \ kpsereadlink.man \ kpsestat.man \ - kpsewhich.man \ - mktexlsr.man \ - mktexmf.man \ - mktexpk.man \ - mktextfm.man + kpsewhich.man EXTRA_DIST = $(man_sources) KPATHSEA_PATHS_H = ${top_builddir}/.. @@ -303,16 +298,11 @@ DITROFF = groff DVIS = $(man_files:.1=.dvi) PSS = $(man_files:.1=.ps) DISTCLEANFILES = sedscript $(man_files) $(DVIS) $(PSS) - -# Symlinks within $(man1dir): FILE:LINK indicates LINK.1->FILE.1 -man1_links = \ - mktexlsr:texhash - all: all-am .SUFFIXES: .SUFFIXES: .1 .man .ps .dvi -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/../../am/man.am $(top_srcdir)/../../am/man1_links.am $(am__configure_deps) +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/../../am/man.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ @@ -332,7 +322,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; -$(top_srcdir)/../../am/man.am $(top_srcdir)/../../am/man1_links.am $(am__empty): +$(top_srcdir)/../../am/man.am $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh @@ -488,8 +478,7 @@ info: info-am info-am: install-data-am: install-man - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-data-hook + install-dvi: install-dvi-am install-dvi-am: @@ -533,24 +522,23 @@ ps: ps-am ps-am: uninstall-am: uninstall-man - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) uninstall-hook + uninstall-man: uninstall-man1 -.MAKE: install-am install-data-am install-strip uninstall-am +.MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am \ - install-data-hook install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-man1 install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ - uninstall-am uninstall-hook uninstall-man uninstall-man1 + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-man1 install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ + ps ps-am tags-am uninstall uninstall-am uninstall-man \ + uninstall-man1 .PRECIOUS: Makefile @@ -586,27 +574,6 @@ sedscript: $(KPATHSEA_PATHS_H)/kpathsea/paths.h .1.ps: $(DITROFF) -Tps -man $< >$@ -.PHONY: install-man1-links uninstall-man1-links - -install-man1-links: - @cd $(DESTDIR)$(man1dir) && \ - for s in $(man1_links); do \ - link=`echo $$s | sed 's,.*:,,'`; \ - file=`echo $$s | sed 's,:.*,,'`; \ - rm -f $$link.1; \ - echo "creating link '$$link.1' -> '$$file.1'"; \ - echo ".so man1/$$file.1" >$$link.1; \ - done - -uninstall-man1-links: - @for s in $(man1_links); do \ - link=`echo $$s | sed 's,.*:,,'`; \ - rm -f $(DESTDIR)$(man1dir)/$$link.1; \ - done - -install-data-hook: install-man1-links - -uninstall-hook: uninstall-man1-links # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/Build/source/texk/texlive/linked_scripts/ChangeLog b/Build/source/texk/texlive/linked_scripts/ChangeLog index e2b97a40fa8..e590cf650fc 100644 --- a/Build/source/texk/texlive/linked_scripts/ChangeLog +++ b/Build/source/texk/texlive/linked_scripts/ChangeLog @@ -1,6 +1,8 @@ -2016-07-20 Karl Berry <karl@tug.org> +2019-12-29 Karl Berry <karl@tug.org> - * scripts.lst: update scripts.lst + * Makefile.am (texmf_other_scripts): add mktexlsr mktexmf + mktexpk mktextfm, now maintained under Master. + (bin_links): add mktexlsr:texhash. 2016-04-10 Karl Berry <karl@tug.org> diff --git a/Build/source/texk/texlive/linked_scripts/Makefile.am b/Build/source/texk/texlive/linked_scripts/Makefile.am index 3f9d61e1dfe..22b1a3ba880 100644 --- a/Build/source/texk/texlive/linked_scripts/Makefile.am +++ b/Build/source/texk/texlive/linked_scripts/Makefile.am @@ -195,6 +195,10 @@ texmf_other_scripts = \ texlive/fmtutil-sys.sh \ texlive/fmtutil-user.sh \ texlive/fmtutil.pl \ + texlive/mktexlsr \ + texlive/mktexmf \ + texlive/mktexpk \ + texlive/mktextfm \ texlive/rungs.tlu \ texlive/tlmgr.pl \ texlive/updmap-sys.sh \ @@ -234,6 +238,7 @@ bin_links = \ cluttex:clxelatex \ cluttex:cllualatex \ epstopdf:repstopdf \ + mktexlsr:texhash \ pdfcrop:rpdfcrop \ texdef:latexdef diff --git a/Build/source/texk/texlive/linked_scripts/Makefile.in b/Build/source/texk/texlive/linked_scripts/Makefile.in index 46b7ea39c1f..62893dcfce9 100644 --- a/Build/source/texk/texlive/linked_scripts/Makefile.in +++ b/Build/source/texk/texlive/linked_scripts/Makefile.in @@ -408,6 +408,10 @@ texmf_other_scripts = \ texlive/fmtutil-sys.sh \ texlive/fmtutil-user.sh \ texlive/fmtutil.pl \ + texlive/mktexlsr \ + texlive/mktexmf \ + texlive/mktexpk \ + texlive/mktextfm \ texlive/rungs.tlu \ texlive/tlmgr.pl \ texlive/updmap-sys.sh \ @@ -443,6 +447,7 @@ bin_links = \ cluttex:clxelatex \ cluttex:cllualatex \ epstopdf:repstopdf \ + mktexlsr:texhash \ pdfcrop:rpdfcrop \ texdef:latexdef diff --git a/Build/source/texk/texlive/linked_scripts/texlive/mktexlsr b/Build/source/texk/texlive/linked_scripts/texlive/mktexlsr new file mode 100755 index 00000000000..5fde39e2c2d --- /dev/null +++ b/Build/source/texk/texlive/linked_scripts/texlive/mktexlsr @@ -0,0 +1,236 @@ +#!/bin/sh +# original mktexlsr -- create or rebuild ls-R. +# +# (If you change or delete the word `original' on the previous line, +# installation won't write this script over yours.) +# +# Suitable for calling from cron, as in: +# 0 * * * * cd /your/texmf/root && /usr/local/texlive/bin/mktexlsr +# +# Originally written as `texhash' by Thomas Esser, Okt., 1994. +# Public domain. + +version='$Id: mktexlsr 46343 2018-01-17 00:55:32Z preining $' +progname=`echo $0 | sed 's%.*/%%'` + +usage="Usage: $progname [OPTION]... [DIR]... + +Rebuild ls-R filename databases used by TeX. If one or more arguments +DIRS are given, these are used as the directories in which to build +ls-R. Else all directories in the search path for ls-R files +(\$TEXMFDBS) are used. + +Options: + --dry-run do not actually update anything + --help display this help and exit + --quiet cancel --verbose + --silent same as --quiet + --verbose explain what is being done + --version output version information and exit + +If standard input is a terminal, --verbose is on by default. + +For more information, see the \`Filename database' section of +Kpathsea manual available at http://tug.org/kpathsea. + +Report bugs to: tex-k@tug.org +TeX Live home page: <http://tug.org/texlive/> +" + +# The simple PATH-prepending approach we take in other scripts doesn't +# handle DOS/Windows, but we don't use the shell scripts on Windows +# anyway, and does anyone want current TL on DOS or DJGPP? Maybe they +# can maintain their own changes if so. Leaving this code though, since +# it's always been here ... + +# MS-DOS and MS-Windows define $COMSPEC or $ComSpec and use `;' to separate +# directories in path lists whereas Unix uses `:'. Make an exception for +# Cygwin, which pretends to be UNIX. +# Create a variable that holds the right character to be used by the scripts. +DOSISH=no +case `uname -s` in + CYGWIN*|Cygwin*|cygwin*) ;; + *) if test -n "$COMSPEC" || test -n "$ComSpec"; then DOSISH=yes; fi +esac +if test "$DOSISH" = "no"; then SEP=':'; else SEP=';';fi + +# Add the location of the script to the PATH if necessary. This must +# be done before kpsewhich can be called, and thus cannot be put into +# mktex.opt. +dirname=`echo $0 | sed 's%/*[^/][^/]*$%%'` +case $dirname in + "") # Do nothing + ;; + /* | [A-z]:/*) # Absolute name + PATH="$dirname$SEP$PATH" + export PATH ;; + *) # Relative name + PATH="`pwd`/$dirname$SEP$PATH" + export PATH ;; +esac + +if tty -s; then verbose=true; else verbose=false; fi +dry_run=false +trees= + +# initialize treefile by either mktemp or some random name +# code taken from pdfjam and adjusted +{ + treefile=` + (umask 077 && mktemp "${TMPDIR-/tmp}/mktexlsrtrees.XXXXXXXXXX") 2>/dev/null + ` && test -n "$treefile" && test -f "$treefile" +} || { + ## We'll use awk to make random number, for portability + random=`awk 'END { srand(); printf ("%d\n", rand()*1000000); }' /dev/null` + treefile="${TMPDIR-/tmp}/mktexlsrtrees$$.$random" +} || exit $? + +trap 'cd /; rm -f $treefile; test -z "$db_dir_tmp" || rm -rf "$db_dir_tmp"; + exit' 0 1 2 3 7 13 15 + +# A copy of some stuff from mktex.opt, so we can run in the presence of +# terminally damaged ls-R files. +while test $# -gt 0; do + if test "x$1" = x--help || test "x$1" = x-help; then + echo "$usage" + exit 0 + elif test "x$1" = x--version || test "x$1" = x-version; then + echo "`basename $0` $version" + kpsewhich --version + exit 0 + elif test "x$1" = x--verbose || test "x$1" = x-verbose; then + verbose=true + elif test "x$1" = x--dry-run || test "x$1" = x-n; then + dry_run=true + elif test "x$1" = x--quiet || test "x$1" = x--silent \ + || test "x$1" = x-quiet || test "x$1" = x-silent ; then + verbose=false + elif test "x$1" = x--; then + : + elif echo "x$1" | grep '^x-' >/dev/null; then + echo "$progname: unknown option \`$1', try --help if you need it." >&2 + exit 1 + else + if test ! -d "$1"; then + echo "$progname: $1: not a directory, skipping." >&2 + shift + continue + fi + # By saving the argument in a file, we can later get it back while + # supporting spaces in the name. This still doesn't support + # newlines in the directory names, but nobody ever complains about + # that, and it seems much too much trouble to use \0 terminators. + (umask 077 + if echo "$1" >>"$treefile"; then :; else + echo "$progname: $treefile: could not append to arg file, goodbye." >&2 + exit 1 + fi + ) + fi + shift +done + +# mktexupd and mktexlsr make sure they're coordinated via this. A copy +# is found mktex.opt. +ls_R_magic='% ls-R -- filename database for kpathsea; do not change this line.' +# The old string, which should continue to work. +old_ls_R_magic='% ls-R -- maintained by MakeTeXls-R; do not change this line.' + +{ + # Get list of directories from the explicit arguments (now saved in + # $treefile), or $TEXMFDBS if no explicit args. Eliminate duplicates. + saveIFS=$IFS # break only at newline + IFS=' +' + if test -s "$treefile"; then + set x `sort "$treefile" | uniq` + else + set x `kpsewhich --show-path=ls-R | tr : ' +' | sort | uniq` + fi + IFS=$saveIFS + shift +} + +for TEXMFLS_R in "$@"; do + # Prepend cwd if the directory was relative. + case "$TEXMFLS_R" in + "") continue ;; # Strictly speaking, it is an error if this case is taken. + /* | [A-z]:/*) ;; + *) TEXMFLS_R="`pwd`/$TEXMFLS_R" + esac + # Allow for either ls-R and ls-r to exist. But create ls-R if we're + # working from scratch. + if test -f "$TEXMFLS_R/ls-R"; then + db_file="$TEXMFLS_R/ls-R" + elif test -f "$TEXMFLS_R/ls-r"; then + db_file="$TEXMFLS_R/ls-r" + else + db_file="$TEXMFLS_R/ls-R" + fi + # Follow a possible symlink to get the right filesystem. + # The '|| true' construct prevents an sh -e aborting. + db_readlink=`kpsereadlink "$TEXMFLS_R/ls-R" 2>/dev/null` || true + case "$db_readlink" in + "") ;; + /* | [A-z]:/*) db_file="$db_readlink" ;; + *) db_file="$TEXMFLS_R/$db_readlink" + esac + db_dir=`echo "$db_file" | sed 's%/[^/][^/]*$%%'` # can't rely on dirname + + # want to be silent if the directory doesn't exist, since the ls-R + # path ordinarily contains many nonexistent directories. + test -d "$db_dir" || continue + test -w "$db_dir" || { echo "$progname: $db_dir: directory not writable. Skipping..." >&2; continue; } + + if test ! -f "$db_file"; then + cp /dev/null "$db_file" + # Use same permissions as parent directory, minus x,s, or t bits. + chmod `kpsestat -xst "$db_dir"` "$db_file" + elif test -s "$db_file" \ + && test "x`sed '1s/
$//;1q' \"$db_file\"`" != "x$ls_R_magic" \ + && test "x`sed '1s/
$//;1q' \"$db_file\"`" != "x$old_ls_R_magic"; then + echo "$progname: $db_file: no magic string, skipping..." >&2 + continue + fi + + # Skip if we cannot write the file: + kpseaccess -w "$db_file" || { echo "$progname: $db_file: no write permission, skipping..." >&2; continue; } + + db_dir_tmp="$db_dir/lsR$$.tmp" + (umask 077 && mkdir "$db_dir_tmp" ) \ + || { echo "$progname: $db_dir_tmp: could not create directory, skipping..." >&2; continue; } + db_file_tmp="$db_dir_tmp/lsR$$.tmp" + rm -f "$db_file_tmp" + + $verbose && echo "$progname: Updating $db_file... " + $dry_run && continue + + echo "$ls_R_magic" >"$db_file_tmp" + + # The main task. We put ./: in the output, so top-level files can be + # found via ls-R. Probably irrelevant in practice. The sed command + # inserts the leading ./ for directory names, and removes ., .., and + # version control entries from the list. Also omit contents of any + # the version directories; sed apparently requires that we do that + # operation in a separate invocation. We do not try to support colons + # in directory names. + # + echo "./:" >>"$db_file_tmp" + vc_dirs='\.\(bzr\|git\|hg\|svn\)\|_darcs' + (cd "$TEXMFLS_R" && \ls -LRa 2>/dev/null) \ + | sed -e '/^$/{n;s%^\./%%;s%^%./%;}; /^\.$/d; /^\.\.$/d; /^'$vc_dirs'$/d;' \ + -e '/^[\.\/]*lsR[0-9]*\.tmp:*$/d' \ + | sed -e /$vc_dirs'.*:$/,/^$/d' \ + >>"$db_file_tmp" + + # To be really safe, a loop. + until PERMS=`kpsestat = "$db_file"`; do sleep 1; done + chmod $PERMS "$db_file_tmp" + rm -f "$db_file" + mv "$db_file_tmp" "$db_file" + rm -rf "$db_dir_tmp" +done + +$verbose && echo "$progname: Done." +exit 0 diff --git a/Build/source/texk/texlive/linked_scripts/texlive/mktexmf b/Build/source/texk/texlive/linked_scripts/texlive/mktexmf new file mode 100755 index 00000000000..bb868c12a8d --- /dev/null +++ b/Build/source/texk/texlive/linked_scripts/texlive/mktexmf @@ -0,0 +1,151 @@ +#!/bin/sh +# original mktexmf -- make a new MF file, because one wasn't found. +# +# (If you change or delete the word `original' on the previous line, +# installation won't write this script over yours.) +# +# Originally written by Thomas Esser. +# Public domain. + +version='$Id: mktexmf 34656 2014-07-18 23:38:50Z karl $' + +# preferentially use subprograms from our own directory. +mydir=`echo "$0" | sed 's,/[^/]*$,,'` +mydir=`cd "$mydir" && pwd` +PATH="$mydir:$PATH"; export PATH + +usage="Usage: $0 FONT. + +Makes the Metafont source file for FONT, if possible. For example, +\`ecr12' or \`cmr11'. + +Report bugs to: tex-k@tug.org +TeX Live home page: <http://tug.org/texlive/> +" + +# Common code for all scripts. +: ${MT_TEXMFMAIN=`kpsewhich --expand-path='$TEXMFMAIN'`} +: ${MT_MKTEX_OPT=`kpsewhich --format='web2c files' mktex.opt`} +test -n "$MT_MKTEX_OPT" || MT_MKTEX_OPT="$MT_TEXMFMAIN/web2c/mktex.opt" +if test ! -f "$MT_MKTEX_OPT"; then + echo "$progname: Cannot find mktex.opt; check your installation." >&2 + exit 1 +fi + +. "$MT_MKTEX_OPT" + +( +# See comments in mktexpk. +name="`echo $1 | sed 's%.*/%%; s%\.mf$%%'`" +rootname=`echo "$name" | sed 's/[0-9]*$//'` +pointsize=`echo "$name" | sed "s/^$rootname//"` + +sauterroot=`kpsewhich b-$rootname.mf 2>/dev/null` +if test -n "$sauterroot"; then + rootfile=$sauterroot + rootname=b-$rootname +else + case $name in + # csso12[0-5][0-9] from CJK package; unsupported by mktexmf + csso12[0-5][0-9]) + rootfile=;; + *) + case $rootname in + cs*|lcsss*|icscsc*|icstt*|ilcsss*) + rootfile=`kpsewhich cscode.mf`;; + wn[bcdfirstuv]*|rx[bcdfiorstuvx][bcfhilmostx]|l[abcdhl][bcdfiorstuvx]*) + lhprefix=`echo "$name" | sed 's/^\(..\).*/\1/'` + rootfile=`kpsewhich ${lhprefix}codes.mf 2>/dev/null`;; + *) + rootfile=`kpsewhich $rootname.mf 2>/dev/null`;; + esac;; + esac +fi +{ test -z "$rootfile" || test ! -f "$rootfile"; } && exit 1 + +#if test -z "$MT_MFNAME"; then +OIFS=$IFS; IFS=$SEP +set x `"$MT_MKTEXNAM" $name`; shift +IFS=$OIFS +MT_MFNAME="$3" +#fi + +destdir=`echo "$MT_MFNAME" | sed 's%/[^/][^/]*$%%'` +test -d "$destdir" || "$MT_MKTEXDIR" "$destdir" || exit 1 +cd "$destdir" || exit 1 + +case "$pointsize" in + "") echo "$progname: no pointsize."; exit 1;; + 11) realsize=10.95;; # \magstephalf + 14) realsize=14.4;; # \magstep2 + 17) realsize=17.28;; # \magstep3 + 20) realsize=20.74;; # \magstep4 + 25) realsize=24.88;; # \magstep5 + 30) realsize=29.86;; # \magstep6 + 36) realsize=35.83;; # \magstep7 + # The new convention is to have three or four letters for the + # font name and four digits for the pointsize. The number is + # pointsize * 100. We effectively divide by 100 by ignoring the + # last two digits. + ????|?????) realsize=`echo "$pointsize" | sed 's/\(..\)$/.\1/'`;; + *) realsize="$pointsize";; +esac + +mfname="$name.mf" +if test -r "$mfname"; then + echo "$progname: $destdir/$mfname already exists." + echo "$destdir/$mfname" >$STDOUT + "$MT_MKTEXUPD" "$destdir" "$mfname" + exit 0 +fi + +case "$name" in + ec*|tc*) + cat > "mf$$.tmp" <<END +if unknown exbase: input exbase fi; +gensize:=$realsize; +generate $rootname; +END + ;; + dc*) + cat > "mf$$.tmp" <<END +if unknown dxbase: input dxbase fi; +gensize:=$realsize; +generate $rootname; +END + ;; + cs*|lcsss*|icscsc*|icstt*|ilcsss*) + cat > "mf$$.tmp" <<END +input cscode +use_driver; +END + ;; + wn[bcdfirstuv]*|rx[bcdfiorstuvx][bcfhilmostx]*|l[abcdhl][bcdfiorstuvx]*) + cat > "mf$$.tmp" <<END +input fikparm; +END + ;; + g[lmorst][bijmtwx][cilnoru]*) + # A small superset of the names of the cbgreek fonts. + cat > "mf$$.tmp" <<END +% generated by mktexmf +input cbgreek; +END + ;; + *) + cat > "mf$$.tmp" <<END +design_size := $realsize; +input $rootname; +END + ;; +esac + +chmod `kpsestat -xst,go-w .` "mf$$.tmp" +rm -f "$mfname" +mv "mf$$.tmp" "$mfname" + +echo "$destdir/$mfname" >$STDOUT +echo "$progname: $destdir/$mfname: successfully generated." >&2 +"$MT_MKTEXUPD" "$destdir" "$mfname" +exit 0 +) 1>&2 </dev/null diff --git a/Build/source/texk/texlive/linked_scripts/texlive/mktexpk b/Build/source/texk/texlive/linked_scripts/texlive/mktexpk new file mode 100755 index 00000000000..2672dc7f78c --- /dev/null +++ b/Build/source/texk/texlive/linked_scripts/texlive/mktexpk @@ -0,0 +1,284 @@ +#!/bin/sh +# original mktexpk -- make a new PK font, because one wasn't found. +# +# (If you change or delete the word `original' on the previous line, +# installation won't write this script over yours.) +# +# Originally written by Thomas Esser, Karl Berry, and Olaf Weber. +# Public domain. + +version='$Id: mktexpk 34656 2014-07-18 23:38:50Z karl $' +progname=`echo $0 | sed 's%.*/%%'` + +# preferentially use subprograms from our own directory. +mydir=`echo "$0" | sed 's,/[^/]*$,,'` +mydir=`cd "$mydir" && pwd` +PATH="$mydir:$PATH"; export PATH + +usage="Usage: $progname [OPTIONS] NAME [REDIRECT], + Create a PK font. + +--dpi DPI use resolution DPI. +--bdpi BDPI use base resolution BDPI. +--mag MAG use magnificiation MAG. +--mfmode MODE use MODE as the METAFONT mode. +--destdir DESTDIR write fonts in DESTDIR. + +Try to create a bitmap PK file for NAME at resolution DPI, with an +assumed device base resolution of BDPI, and a Metafont \`mag' of +MAG. Use MODE for the METAFONT mode. Use DESTDIR for the root of where +to install into, either the absolute directory name to use (if it starts +with a /) or relative to the default DESTDIR (if not). REDIRECT, if +supplied, is a string of the form '>&n', where n is the number of the +file descriptor which is to receive, instead of stdout, the name of the +newly created pk file. + +If you expected the font to be available as an outline, and thus this +script does not work and should not have been called, most likely the +font's .tfm name is missing from the relevant map file (e.g., +psfonts.map for dvips, pdftex.map for pdftex). These map files are +typically maintained using updmap; q.v. + +For step-by-step instructions on making new fonts known to TeX, see +http://tug.org/fonts/fontinstall.html. + +Report bugs to: tex-k@tug.org +TeX Live home page: <http://tug.org/texlive/> +" + +# Handle non-positional options, except for --version/--help +while test $# -gt 0; do + case "$1" in + --destdir) shift; DEST="$1"; shift ;; + --destdir=*) DEST=`echo "$1" | sed 's/--destdir=//'`; shift ;; + --dpi) shift; DPI="$1"; shift ;; + --dpi=*) DPI=`echo "$1" | sed 's/--dpi=//'`; shift ;; + --bdpi) shift; BDPI="$1"; shift ;; + --bdpi=*) BDPI=`echo "$1" | sed 's/--bdpi=//'`; shift ;; + --mfmode) shift; test "x$1" != "x/" && MODE="$1"; shift ;; + --mfmode=*) test "x$1" != "x--mfmode/" \ + && MODE=`echo "$1" | sed 's/--mfmode=//'`; shift ;; + --mag) shift; MAG="$1"; shift;; + --mag=*) MAG=`echo "$1" | sed '/s--mag=//'`; shift;; + --version|-version) break ;; + --help|-help) break ;; + *) break ;; + esac +done + +if test "x$2" != x; then + tail="`echo \"x$2\" | sed 's/^x>&//' | grep '^[0-9]*$'`" + if test -z "$tail"; then + echo "$progname: argument '$2' ignored - bad file number" >&2 + elif test "$tail" != 1; then + eval 'exec 1>&$tail' + fi +fi + +mt_max_args=2 + +# Common code for all scripts. +: ${MT_TEXMFMAIN=`kpsewhich --expand-path='$TEXMFMAIN'`} +: ${MT_MKTEX_OPT=`kpsewhich --format='web2c files' mktex.opt`} +test -n "$MT_MKTEX_OPT" || MT_MKTEX_OPT="$MT_TEXMFMAIN/web2c/mktex.opt" +if test ! -f "$MT_MKTEX_OPT"; then + echo "$progname: Cannot find mktex.opt; check your installation." >&2 + exit 1 +fi + +. "$MT_MKTEX_OPT" + +# Where do potential driver files belong? +case "$MT_FEATURES" in + *nomfdrivers*) + : ${MT_MFDESTDIR=`pwd`} + export MT_MFDESTDIR;; +esac + +# Since we want to pass the generated filename and only that filename +# back to the caller on standard output, we do some redirections so +# regular echo's will end up on stderr, and do an echo >$STDOUT at the end. +# Then the contents of $STDOUT will be echoed to stdout by a trap. + +# start of redirection stdout -> stderr, stdin <- /dev/null +( + +NAME=$1 + +if kpsewhich $NAME.mf >/dev/null 2>&1 || mktexmf $NAME >/dev/null 2>&1; then + # determine the progname of metafont to use; prefer mf-nowin. + if (mf-nowin --version) >/dev/null 2>&1; then + MF="mf-nowin -progname=mf" + else + MF=mf + fi + + # Check that $BDPI and $MODE are consistent; if not, ignore the mode and + # hope we can correctly guess it from bdpi. (People like to specify the + # resolution on the command line, not the mode so much.) + if test -n "$MODE"; then + mf_bdpi=`$MF \ +'\mode:='$MODE';mode_setup;message"BDPI= "&decimal round pixels_per_inch;end.'\ + </dev/null \ + | awk '/DPI=/ {print $2}'` + if test "x$mf_bdpi" != x$BDPI; then + echo "$progname: Mismatched mode $MODE and resolution $BDPI; ignoring mode." >&2 + MODE= + fi + fi + + # If an explicit mode is not supplied, try to guess. You can get a + # list of extant modes from ftp://ftp.tug.org/tex/modes.mf. + if test -z "$MODE" || test "x$MODE" = xdefault; then + case "$BDPI" in + 85) MODE=sun;; + 100) MODE=nextscrn;; + 180) MODE=toshiba;; + 300) MODE=cx;; + 360) MODE=epstylus;; + 400) MODE=nexthi;; + 600) MODE=ljfour;; + 720) MODE=epscszz;; + 1200) MODE=ultre;; + 1270) MODE=linoone;; + 8000) MODE=dpdfezzz;; + *) echo "$progname: Can't guess mode for $BDPI dpi devices." >&2 + echo "$progname: Use a config file or option to specify the mode; see:" >&2 + echo "$progname: http://tug.org/texinfohtml/kpathsea.html#Unable-to-generate-fonts" >&2 + exit 1 + esac + fi + + # Run Metafont. Always use plain Metafont, since reading cmbase.mf + # does not noticeably slow things down. + cmd="$MF \mode:=$MODE; mag:=$MAG; nonstopmode; input $NAME" +else + MODE=modeless + # ps_to_pk is set in mktex.opt + case $ps_to_pk in + gsftopk) + if $ps_to_pk -t "$NAME"; then + cmd="$ps_to_pk $NAME $DPI" + fi;; + ps2pk) + # grep for the font in $PSMAPFILE. These are base font names, such as + # rpplr (the original) or pplr0 (an interim step) or pplr8r (current). + : ${PSMAPFILE=`kpsewhich --format=map psfonts.map ps2pk.map`} + pattern="^$NAME"'([ ]|$)' + psline=`egrep "$pattern" $PSMAPFILE | tail -1` + if test -n "$psline"; then + set x `echo "$psline" | sed 's%[<["]%%g'` + shift; shift; shift; + encoding=; psname=; slant=; extend= + while test ! -z "$1"; do + case "$1" in + *.enc) encoding="-e $1";; + *.pf[ab]) psname="$1";; + *SlantFont) slant="-S $lastopt";; + *ExtendFont) extend="-E $lastopt";; + esac + lastopt="$1" + shift + done + # Guessing the name of the type1 font file as fallback: + ANAME=`echo $NAME | sed 's/8r$/8a/'` + for i in $NAME.pfa $NAME.pfb $ANAME.pfa $ANAME.pfb; do + if kpsewhich $i >/dev/null 2>&1; then + psname=$i + break + fi + done + + if [ -n "$psname" ]; then + cmd="ps2pk -v -X$DPI -R$BDPI $slant $extend $encoding $psname $NAME.${DPI}pk" + else + if gsftopk -t "$NAME"; then + echo "$progname: cannot find $NAME.pfa or $NAME.pfb. Trying gsftopk." >&2 + cmd="gsftopk $NAME $DPI" + fi + fi + fi;; + esac + + # unsupported by $ps_to_pk, try other conversions: + if test -z "$cmd"; then + if (ttf2pk -t -q $NAME) >/dev/null 2>&1; then + cmd="ttf2pk -q $NAME $DPI" + elif (hbf2gf -t -q $NAME) >/dev/null 2>&1; then + cmd="hbf2gf -q -p $NAME $DPI" + else + echo "$progname: don't know how to create bitmap font for $NAME." >&2 + echo "$progname: perhaps $NAME is missing from the map file." >&2 + exit 1 + fi + fi +fi + +OIFS=$IFS; IFS=$SEP +set x `"$MT_MKTEXNAM" $NAME $DPI $MODE $DEST`; shift +IFS=$OIFS + +PKDEST="$1" +PKDESTDIR=`echo "$PKDEST" | sed 's%/[^/][^/]*$%%'` # can't rely on dirname +PKNAME=`basename "$PKDEST"` +GFNAME=$NAME.${DPI}gf + +if test -r "$PKDESTDIR/$PKNAME"; then + echo "$progname: $PKDESTDIR/$PKNAME already exists." >&2 + echo "$PKDESTDIR/$PKNAME" >$STDOUT + "$MT_MKTEXUPD" "$PKDESTDIR" $PKNAME + exit 0 +fi + +"$MT_MKTEXDIR" "$PKDESTDIR" +if test ! -d "$PKDESTDIR"; then + echo "$progname: $MT_MKTEXDIR $PKDESTDIR failed." >&2 + exit 1 +fi + +echo "$progname: Running $cmd" +$cmd </dev/null || { + # Don't abort if only "Strange path", "bad pos" or "angle(0,0)" + # errors occurr. + grep '^!' $NAME.log | sort >$$.errs 2>/dev/null + grep '^! Strange path' $$.errs >$$.strange 2>/dev/null + grep '^! bad pos.' $$.errs >$$.badpos 2>/dev/null + grep '^! angle(0,0) is taken as zero.' $$.errs >$$.angle 2>/dev/null + cat $$.badpos $$.strange $$.angle | sort > $$.errs_accept + if cmp $$.errs $$.errs_accept >/dev/null 2>&1; then + test -s $$.strange >/dev/null 2>&1 \ + && echo "$progname: warning: \`$cmd' caused strange path errors." >&2 + test -s $$.badpos >/dev/null 2>&1 \ + && echo "$progname: warning: \`$cmd' caused bad pos errors." >&2 + test -s $$.angle >/dev/null 2>&1 \ + && echo "$progname: warning: \`$cmd' caused angle(0,0) errors." >&2 + else + echo "$progname: \`$cmd' failed." >&2 + test -s $NAME.log && mv -f $NAME.log "$KPSE_DOT" + exit 1; + fi +} + +test -r $GFNAME && { gftopk ./$GFNAME $PKNAME || exit 1; } +test ! -f $PKNAME && test -f $NAME.${DPI}pk && mv $NAME.${DPI}pk $PKNAME +if test ! -s $PKNAME; then + echo "$progname: \`$cmd' failed to make $PKNAME." >&2 + exit 1 +fi + +# Install the PK file carefully, since others may be working simultaneously. +# Use cp when mv fails, since DOS will fail mv for deeply-nested directories. +mv $PKNAME "$PKDESTDIR/pk$$.tmp" 2>/dev/null \ + || cp $PKNAME "$PKDESTDIR/pk$$.tmp" || exit 1 +cd "$PKDESTDIR" || exit 1 +chmod `kpsestat -xst,go-w .` pk$$.tmp +test -r $PKNAME || mv pk$$.tmp $PKNAME || exit 1 + +# Update ls-R if necessary. +"$MT_MKTEXUPD" "$PKDESTDIR" $PKNAME + +# If this line (or an equivalent) is not present, dvipsk/xdvik/dviljk +# will think mktexpk failed. Any other output to stdout will also lose. +echo "$PKDESTDIR/$PKNAME" >$STDOUT +echo "$progname: $PKDESTDIR/$PKNAME: successfully generated." >&2 +) 1>&2 </dev/null diff --git a/Build/source/texk/texlive/linked_scripts/texlive/mktextfm b/Build/source/texk/texlive/linked_scripts/texlive/mktextfm new file mode 100755 index 00000000000..46e30a9c5dc --- /dev/null +++ b/Build/source/texk/texlive/linked_scripts/texlive/mktextfm @@ -0,0 +1,162 @@ +#!/bin/sh +# original mktextfm -- make a new TFM file, because one wasn't found. +# +# (If you change or delete the word `original' on the previous line, +# installation won't write this script over yours.) +# +# Primarily written by Thomas Esser, Karl Berry, and Olaf Weber. +# Public domain. + +version='$Id: mktextfm 34656 2014-07-18 23:38:50Z karl $' +progname=`echo $0 | sed 's%.*/%%'` + +# preferentially use subprograms from our own directory. +mydir=`echo "$0" | sed 's,/[^/]*$,,'` +mydir=`cd "$mydir" && pwd` +PATH="$mydir:$PATH"; export PATH + +usage="Usage: $progname [--destdir DESTDIR] FONT. + +Makes a TFM file for FONT, if possible. Use DESTDIR for the root of where +to install into, either the absolute directory name to use (if it starts +with a /) or relative to the default DESTDIR (if not). + +Report bugs to: tex-k@tug.org +TeX Live home page: <http://tug.org/texlive/> +" + +# Handle non-positional options, except for --version/--help +while test $# -gt 0; do + case "$1" in + --destdir) shift; DEST="$1"; shift ;; + --destdir=*) DEST=`echo "$1" | sed 's/--destdir=//'`; shift ;; + --version|-version) break ;; + --help|-help) break ;; + *) break ;; + esac +done + +# Common code for all scripts. +: ${MT_TEXMFMAIN=`kpsewhich --expand-path='$TEXMFMAIN'`} +: ${MT_MKTEX_OPT=`kpsewhich --format='web2c files' mktex.opt`} +test -n "$MT_MKTEX_OPT" || MT_MKTEX_OPT="$MT_TEXMFMAIN/web2c/mktex.opt" +if test ! -f "$MT_MKTEX_OPT"; then + echo "$progname: Cannot find mktex.opt; check your installation." >&2 + exit 1 +fi + +. "$MT_MKTEX_OPT" + +# Where do potential mf driver files go? +case "$MT_FEATURES" in + *nomfdrivers*) + : ${MT_MFDESTDIR=`pwd`} + export MT_MFDESTDIR;; +esac + +# start of redirection stdout -> stderr, stdin <- /dev/null +( + +NAME=`basename "$1" .tfm` +MAG=1 # mag=0 fails with larm1000.mf +#DEST="$2" +DPI=$BDPI + +OIFS=$IFS; IFS=$SEP +set x `"$MT_MKTEXNAM" $NAME $DPI $MODE $DEST`; shift +IFS=$OIFS + +PKDEST="$1" +TFMDEST="$2" +PKDESTDIR=`echo "$PKDEST" | sed 's%/[^/][^/]*$%%'` # can't rely on dirname +TFMDESTDIR=`echo "$TFMDEST" | sed 's%/[^/][^/]*$%%'` +PKNAME=`basename "$PKDEST"` +TFMNAME=$NAME.tfm +GFNAME=$NAME.$DPI'gf' + +if test -r "$TFMDESTDIR/$TFMNAME"; then + echo "$progname: $TFMDESTDIR/$TFMNAME already exists." >&2 + echo "$TFMDESTDIR/$TFMNAME" >$STDOUT + "$MT_MKTEXUPD" "$TFMDESTDIR" $TFMNAME + exit +fi + +# Try to create the destdir first. Do not create fonts, if this fails. +"$MT_MKTEXDIR" "$TFMDESTDIR" +if test ! -d "$TFMDESTDIR"; then + echo "$progname: mktexdir $TFMDESTDIR failed." + exit 1 +fi + +# Check if this font is supported by hbf2gf else use metafont. +if (hbf2gf -q -t $NAME) >/dev/null 2>&1; then + cmd="hbf2gf -g $NAME $DPI" +else + # determine the progname of metafont to use; prefer mf-nowin. + if (mf-nowin --version) >/dev/null 2>&1; then + MF="mf-nowin -progname=mf" + else + MF=mf + fi + + cmd="$MF \mode:=$MODE; mag:=$MAG; nonstopmode; input $NAME" +fi + +echo "$progname: Running $cmd" +$cmd </dev/null || { + # Don't abort if only "Strange path", "bad pos" or "angle(0,0)" + # errors occurr. + grep '^!' $NAME.log | sort >$$.errs 2>/dev/null + grep '^! Strange path' $$.errs >$$.strange 2>/dev/null + grep '^! bad pos.' $$.errs >$$.badpos 2>/dev/null + grep '^! angle(0,0) is taken as zero.' $$.errs >$$.angle 2>/dev/null + cat $$.badpos $$.strange $$.angle | sort > $$.errs_accept + if cmp $$.errs $$.errs_accept >/dev/null 2>&1; then + test -s $$.strange >/dev/null 2>&1 \ + && echo "$progname: warning: \`$cmd' caused strange path errors." >&2 + test -s $$.badpos >/dev/null 2>&1 \ + && echo "$progname: warning: \`$cmd' caused bad pos errors." >&2 + test -s $$.angle >/dev/null 2>&1 \ + && echo "$progname: warning: \`$cmd' caused angle(0,0) errors." >&2 + else + echo "$progname: \`$cmd' failed." >&2 + test -s $NAME.log && mv -f $NAME.log "$KPSE_DOT" + exit 1; + fi +} + +# hbf2gf just produces a .pl file: +test -r ./$NAME.pl && pltotf ./$NAME.pl $TFMNAME +test -r $TFMNAME || { echo "$progname: \`$cmd' failed to make $TFMNAME."; exit 1; } + +# Install the TFM file carefully, since others may be working simultaneously. +# Use cp when mv fails, since DOS will fail mv for deeply-nested directories. +mv $TFMNAME "$TFMDESTDIR/tfm$$.tmp" 2>/dev/null \ + || cp $TFMNAME "$TFMDESTDIR/tfm$$.tmp" || exit 1 +cd "$TFMDESTDIR" || exit 1 +chmod `kpsestat -xst,go-w .` tfm$$.tmp +test -r $TFMNAME || mv tfm$$.tmp $TFMNAME || exit 1 + +# OK, success with the TFM. +"$MT_MKTEXUPD" "$TFMDESTDIR" $TFMNAME +echo "$TFMDESTDIR/$TFMNAME" >$STDOUT +echo "$progname: $TFMDESTDIR/$TFMNAME: successfully generated." >&2 + +# Since we probably made a GF(->PK) file, too, may as well install it if +# it's needed. +cd $TEMPDIR +if test -r $GFNAME && test ! -f "$PKDESTDIR/$PKNAME"; then + gftopk ./$GFNAME $PKNAME || exit 1 + "$MT_MKTEXDIR" "$PKDESTDIR" + mv $PKNAME "$PKDESTDIR/pk$$.tmp" 2>/dev/null \ + || cp $PKNAME "$PKDESTDIR/pk$$.tmp" || exit 1 + cd "$PKDESTDIR" || exit 1 + if test -f $PKNAME; then + rm -f pk$$.tmp + else + chmod `kpsestat -xst,go-w .` pk$$.tmp + mv pk$$.tmp $PKNAME + "$MT_MKTEXUPD" "$PKDESTDIR" $PKNAME + fi +fi +) 1>&2 </dev/null diff --git a/Build/source/texk/texlive/tl_scripts/ChangeLog b/Build/source/texk/texlive/tl_scripts/ChangeLog index cffe32791a7..38f3e96aadd 100644 --- a/Build/source/texk/texlive/tl_scripts/ChangeLog +++ b/Build/source/texk/texlive/tl_scripts/ChangeLog @@ -1,3 +1,15 @@ +2019-12-29 Karl Berry <karl@tug.org> + + * mktexlsr.1, + * mktexmf.1, + * mktexpk.1, + * mktextfm.1: add here, moved from + Build/source/texk/kpathsea/man. Not yet sure of the best way + to handle the man pages for Master-maintained scripts, but this will + suffice for now. + * Makefile.am (dist_man_MANS): add mktex{lsr,mf,pk,tfm}.man. + (man1_links): add mktexlsr:texhash. + 2017-12-18 Karl Berry <karl@tug.org> * texconfig.sh: more updates from Norbert to use tlmgr (from 45882). diff --git a/Build/source/texk/texlive/tl_scripts/Makefile.am b/Build/source/texk/texlive/tl_scripts/Makefile.am index 1773f76793c..f10160f4cd2 100644 --- a/Build/source/texk/texlive/tl_scripts/Makefile.am +++ b/Build/source/texk/texlive/tl_scripts/Makefile.am @@ -1,6 +1,7 @@ +## $Id$ ## Makefile.am for the TeX Live subdirectory texk/texlive/tl_scripts/ ## -## Copyright 2013-2015 Karl Berry <tex-live@tug.org> +## Copyright 2013-2019 Karl Berry <tex-live@tug.org> ## You may freely use, modify and/or distribute this file. ## Build lists of scripts. @@ -63,6 +64,10 @@ dist_man_MANS = \ fontinst.1 \ kpsetool.1 \ kpsewhere.1 \ + mktexlsr.1 \ + mktexmf.1 \ + mktexpk.1 \ + mktextfm.1 \ ps2frag.1 \ pslatex.1 \ rubibtex.1 \ @@ -85,6 +90,7 @@ man1_links = \ kpsetool:kpsexpand \ kpsetool:kpsepath \ fmtutil:mktexfmt \ + mktexlsr:texhash \ texconfig:texconfig-sys \ updmap:updmap-sys diff --git a/Build/source/texk/texlive/tl_scripts/Makefile.in b/Build/source/texk/texlive/tl_scripts/Makefile.in index e08b057b304..89a25b7ddf2 100644 --- a/Build/source/texk/texlive/tl_scripts/Makefile.in +++ b/Build/source/texk/texlive/tl_scripts/Makefile.in @@ -295,6 +295,10 @@ dist_man_MANS = \ fontinst.1 \ kpsetool.1 \ kpsewhere.1 \ + mktexlsr.1 \ + mktexmf.1 \ + mktexpk.1 \ + mktextfm.1 \ ps2frag.1 \ pslatex.1 \ rubibtex.1 \ @@ -315,6 +319,7 @@ man1_links = \ kpsetool:kpsexpand \ kpsetool:kpsepath \ fmtutil:mktexfmt \ + mktexlsr:texhash \ texconfig:texconfig-sys \ updmap:updmap-sys diff --git a/Build/source/texk/kpathsea/man/mktexlsr.man b/Build/source/texk/texlive/tl_scripts/mktexlsr.1 index d314b5ca502..d314b5ca502 100644 --- a/Build/source/texk/kpathsea/man/mktexlsr.man +++ b/Build/source/texk/texlive/tl_scripts/mktexlsr.1 diff --git a/Build/source/texk/kpathsea/man/mktexmf.man b/Build/source/texk/texlive/tl_scripts/mktexmf.1 index c6857fe6b91..c6857fe6b91 100644 --- a/Build/source/texk/kpathsea/man/mktexmf.man +++ b/Build/source/texk/texlive/tl_scripts/mktexmf.1 diff --git a/Build/source/texk/kpathsea/man/mktexpk.man b/Build/source/texk/texlive/tl_scripts/mktexpk.1 index 677aaf6b43d..677aaf6b43d 100644 --- a/Build/source/texk/kpathsea/man/mktexpk.man +++ b/Build/source/texk/texlive/tl_scripts/mktexpk.1 diff --git a/Build/source/texk/kpathsea/man/mktextfm.man b/Build/source/texk/texlive/tl_scripts/mktextfm.1 index 38c068862f1..38c068862f1 100644 --- a/Build/source/texk/kpathsea/man/mktextfm.man +++ b/Build/source/texk/texlive/tl_scripts/mktextfm.1 diff --git a/Master/bin/aarch64-linux/mktexlsr b/Master/bin/aarch64-linux/mktexlsr index 5fde39e2c2d..a36378a2b9f 100755..120000 --- a/Master/bin/aarch64-linux/mktexlsr +++ b/Master/bin/aarch64-linux/mktexlsr @@ -1,236 +1 @@ -#!/bin/sh -# original mktexlsr -- create or rebuild ls-R. -# -# (If you change or delete the word `original' on the previous line, -# installation won't write this script over yours.) -# -# Suitable for calling from cron, as in: -# 0 * * * * cd /your/texmf/root && /usr/local/texlive/bin/mktexlsr -# -# Originally written as `texhash' by Thomas Esser, Okt., 1994. -# Public domain. - -version='$Id: mktexlsr 46343 2018-01-17 00:55:32Z preining $' -progname=`echo $0 | sed 's%.*/%%'` - -usage="Usage: $progname [OPTION]... [DIR]... - -Rebuild ls-R filename databases used by TeX. If one or more arguments -DIRS are given, these are used as the directories in which to build -ls-R. Else all directories in the search path for ls-R files -(\$TEXMFDBS) are used. - -Options: - --dry-run do not actually update anything - --help display this help and exit - --quiet cancel --verbose - --silent same as --quiet - --verbose explain what is being done - --version output version information and exit - -If standard input is a terminal, --verbose is on by default. - -For more information, see the \`Filename database' section of -Kpathsea manual available at http://tug.org/kpathsea. - -Report bugs to: tex-k@tug.org -TeX Live home page: <http://tug.org/texlive/> -" - -# The simple PATH-prepending approach we take in other scripts doesn't -# handle DOS/Windows, but we don't use the shell scripts on Windows -# anyway, and does anyone want current TL on DOS or DJGPP? Maybe they -# can maintain their own changes if so. Leaving this code though, since -# it's always been here ... - -# MS-DOS and MS-Windows define $COMSPEC or $ComSpec and use `;' to separate -# directories in path lists whereas Unix uses `:'. Make an exception for -# Cygwin, which pretends to be UNIX. -# Create a variable that holds the right character to be used by the scripts. -DOSISH=no -case `uname -s` in - CYGWIN*|Cygwin*|cygwin*) ;; - *) if test -n "$COMSPEC" || test -n "$ComSpec"; then DOSISH=yes; fi -esac -if test "$DOSISH" = "no"; then SEP=':'; else SEP=';';fi - -# Add the location of the script to the PATH if necessary. This must -# be done before kpsewhich can be called, and thus cannot be put into -# mktex.opt. -dirname=`echo $0 | sed 's%/*[^/][^/]*$%%'` -case $dirname in - "") # Do nothing - ;; - /* | [A-z]:/*) # Absolute name - PATH="$dirname$SEP$PATH" - export PATH ;; - *) # Relative name - PATH="`pwd`/$dirname$SEP$PATH" - export PATH ;; -esac - -if tty -s; then verbose=true; else verbose=false; fi -dry_run=false -trees= - -# initialize treefile by either mktemp or some random name -# code taken from pdfjam and adjusted -{ - treefile=` - (umask 077 && mktemp "${TMPDIR-/tmp}/mktexlsrtrees.XXXXXXXXXX") 2>/dev/null - ` && test -n "$treefile" && test -f "$treefile" -} || { - ## We'll use awk to make random number, for portability - random=`awk 'END { srand(); printf ("%d\n", rand()*1000000); }' /dev/null` - treefile="${TMPDIR-/tmp}/mktexlsrtrees$$.$random" -} || exit $? - -trap 'cd /; rm -f $treefile; test -z "$db_dir_tmp" || rm -rf "$db_dir_tmp"; - exit' 0 1 2 3 7 13 15 - -# A copy of some stuff from mktex.opt, so we can run in the presence of -# terminally damaged ls-R files. -while test $# -gt 0; do - if test "x$1" = x--help || test "x$1" = x-help; then - echo "$usage" - exit 0 - elif test "x$1" = x--version || test "x$1" = x-version; then - echo "`basename $0` $version" - kpsewhich --version - exit 0 - elif test "x$1" = x--verbose || test "x$1" = x-verbose; then - verbose=true - elif test "x$1" = x--dry-run || test "x$1" = x-n; then - dry_run=true - elif test "x$1" = x--quiet || test "x$1" = x--silent \ - || test "x$1" = x-quiet || test "x$1" = x-silent ; then - verbose=false - elif test "x$1" = x--; then - : - elif echo "x$1" | grep '^x-' >/dev/null; then - echo "$progname: unknown option \`$1', try --help if you need it." >&2 - exit 1 - else - if test ! -d "$1"; then - echo "$progname: $1: not a directory, skipping." >&2 - shift - continue - fi - # By saving the argument in a file, we can later get it back while - # supporting spaces in the name. This still doesn't support - # newlines in the directory names, but nobody ever complains about - # that, and it seems much too much trouble to use \0 terminators. - (umask 077 - if echo "$1" >>"$treefile"; then :; else - echo "$progname: $treefile: could not append to arg file, goodbye." >&2 - exit 1 - fi - ) - fi - shift -done - -# mktexupd and mktexlsr make sure they're coordinated via this. A copy -# is found mktex.opt. -ls_R_magic='% ls-R -- filename database for kpathsea; do not change this line.' -# The old string, which should continue to work. -old_ls_R_magic='% ls-R -- maintained by MakeTeXls-R; do not change this line.' - -{ - # Get list of directories from the explicit arguments (now saved in - # $treefile), or $TEXMFDBS if no explicit args. Eliminate duplicates. - saveIFS=$IFS # break only at newline - IFS=' -' - if test -s "$treefile"; then - set x `sort "$treefile" | uniq` - else - set x `kpsewhich --show-path=ls-R | tr : ' -' | sort | uniq` - fi - IFS=$saveIFS - shift -} - -for TEXMFLS_R in "$@"; do - # Prepend cwd if the directory was relative. - case "$TEXMFLS_R" in - "") continue ;; # Strictly speaking, it is an error if this case is taken. - /* | [A-z]:/*) ;; - *) TEXMFLS_R="`pwd`/$TEXMFLS_R" - esac - # Allow for either ls-R and ls-r to exist. But create ls-R if we're - # working from scratch. - if test -f "$TEXMFLS_R/ls-R"; then - db_file="$TEXMFLS_R/ls-R" - elif test -f "$TEXMFLS_R/ls-r"; then - db_file="$TEXMFLS_R/ls-r" - else - db_file="$TEXMFLS_R/ls-R" - fi - # Follow a possible symlink to get the right filesystem. - # The '|| true' construct prevents an sh -e aborting. - db_readlink=`kpsereadlink "$TEXMFLS_R/ls-R" 2>/dev/null` || true - case "$db_readlink" in - "") ;; - /* | [A-z]:/*) db_file="$db_readlink" ;; - *) db_file="$TEXMFLS_R/$db_readlink" - esac - db_dir=`echo "$db_file" | sed 's%/[^/][^/]*$%%'` # can't rely on dirname - - # want to be silent if the directory doesn't exist, since the ls-R - # path ordinarily contains many nonexistent directories. - test -d "$db_dir" || continue - test -w "$db_dir" || { echo "$progname: $db_dir: directory not writable. Skipping..." >&2; continue; } - - if test ! -f "$db_file"; then - cp /dev/null "$db_file" - # Use same permissions as parent directory, minus x,s, or t bits. - chmod `kpsestat -xst "$db_dir"` "$db_file" - elif test -s "$db_file" \ - && test "x`sed '1s/
$//;1q' \"$db_file\"`" != "x$ls_R_magic" \ - && test "x`sed '1s/
$//;1q' \"$db_file\"`" != "x$old_ls_R_magic"; then - echo "$progname: $db_file: no magic string, skipping..." >&2 - continue - fi - - # Skip if we cannot write the file: - kpseaccess -w "$db_file" || { echo "$progname: $db_file: no write permission, skipping..." >&2; continue; } - - db_dir_tmp="$db_dir/lsR$$.tmp" - (umask 077 && mkdir "$db_dir_tmp" ) \ - || { echo "$progname: $db_dir_tmp: could not create directory, skipping..." >&2; continue; } - db_file_tmp="$db_dir_tmp/lsR$$.tmp" - rm -f "$db_file_tmp" - - $verbose && echo "$progname: Updating $db_file... " - $dry_run && continue - - echo "$ls_R_magic" >"$db_file_tmp" - - # The main task. We put ./: in the output, so top-level files can be - # found via ls-R. Probably irrelevant in practice. The sed command - # inserts the leading ./ for directory names, and removes ., .., and - # version control entries from the list. Also omit contents of any - # the version directories; sed apparently requires that we do that - # operation in a separate invocation. We do not try to support colons - # in directory names. - # - echo "./:" >>"$db_file_tmp" - vc_dirs='\.\(bzr\|git\|hg\|svn\)\|_darcs' - (cd "$TEXMFLS_R" && \ls -LRa 2>/dev/null) \ - | sed -e '/^$/{n;s%^\./%%;s%^%./%;}; /^\.$/d; /^\.\.$/d; /^'$vc_dirs'$/d;' \ - -e '/^[\.\/]*lsR[0-9]*\.tmp:*$/d' \ - | sed -e /$vc_dirs'.*:$/,/^$/d' \ - >>"$db_file_tmp" - - # To be really safe, a loop. - until PERMS=`kpsestat = "$db_file"`; do sleep 1; done - chmod $PERMS "$db_file_tmp" - rm -f "$db_file" - mv "$db_file_tmp" "$db_file" - rm -rf "$db_dir_tmp" -done - -$verbose && echo "$progname: Done." -exit 0 +../../texmf-dist/scripts/texlive/mktexlsr
\ No newline at end of file diff --git a/Master/bin/aarch64-linux/mktexmf b/Master/bin/aarch64-linux/mktexmf index bb868c12a8d..302c00f763e 100755..120000 --- a/Master/bin/aarch64-linux/mktexmf +++ b/Master/bin/aarch64-linux/mktexmf @@ -1,151 +1 @@ -#!/bin/sh -# original mktexmf -- make a new MF file, because one wasn't found. -# -# (If you change or delete the word `original' on the previous line, -# installation won't write this script over yours.) -# -# Originally written by Thomas Esser. -# Public domain. - -version='$Id: mktexmf 34656 2014-07-18 23:38:50Z karl $' - -# preferentially use subprograms from our own directory. -mydir=`echo "$0" | sed 's,/[^/]*$,,'` -mydir=`cd "$mydir" && pwd` -PATH="$mydir:$PATH"; export PATH - -usage="Usage: $0 FONT. - -Makes the Metafont source file for FONT, if possible. For example, -\`ecr12' or \`cmr11'. - -Report bugs to: tex-k@tug.org -TeX Live home page: <http://tug.org/texlive/> -" - -# Common code for all scripts. -: ${MT_TEXMFMAIN=`kpsewhich --expand-path='$TEXMFMAIN'`} -: ${MT_MKTEX_OPT=`kpsewhich --format='web2c files' mktex.opt`} -test -n "$MT_MKTEX_OPT" || MT_MKTEX_OPT="$MT_TEXMFMAIN/web2c/mktex.opt" -if test ! -f "$MT_MKTEX_OPT"; then - echo "$progname: Cannot find mktex.opt; check your installation." >&2 - exit 1 -fi - -. "$MT_MKTEX_OPT" - -( -# See comments in mktexpk. -name="`echo $1 | sed 's%.*/%%; s%\.mf$%%'`" -rootname=`echo "$name" | sed 's/[0-9]*$//'` -pointsize=`echo "$name" | sed "s/^$rootname//"` - -sauterroot=`kpsewhich b-$rootname.mf 2>/dev/null` -if test -n "$sauterroot"; then - rootfile=$sauterroot - rootname=b-$rootname -else - case $name in - # csso12[0-5][0-9] from CJK package; unsupported by mktexmf - csso12[0-5][0-9]) - rootfile=;; - *) - case $rootname in - cs*|lcsss*|icscsc*|icstt*|ilcsss*) - rootfile=`kpsewhich cscode.mf`;; - wn[bcdfirstuv]*|rx[bcdfiorstuvx][bcfhilmostx]|l[abcdhl][bcdfiorstuvx]*) - lhprefix=`echo "$name" | sed 's/^\(..\).*/\1/'` - rootfile=`kpsewhich ${lhprefix}codes.mf 2>/dev/null`;; - *) - rootfile=`kpsewhich $rootname.mf 2>/dev/null`;; - esac;; - esac -fi -{ test -z "$rootfile" || test ! -f "$rootfile"; } && exit 1 - -#if test -z "$MT_MFNAME"; then -OIFS=$IFS; IFS=$SEP -set x `"$MT_MKTEXNAM" $name`; shift -IFS=$OIFS -MT_MFNAME="$3" -#fi - -destdir=`echo "$MT_MFNAME" | sed 's%/[^/][^/]*$%%'` -test -d "$destdir" || "$MT_MKTEXDIR" "$destdir" || exit 1 -cd "$destdir" || exit 1 - -case "$pointsize" in - "") echo "$progname: no pointsize."; exit 1;; - 11) realsize=10.95;; # \magstephalf - 14) realsize=14.4;; # \magstep2 - 17) realsize=17.28;; # \magstep3 - 20) realsize=20.74;; # \magstep4 - 25) realsize=24.88;; # \magstep5 - 30) realsize=29.86;; # \magstep6 - 36) realsize=35.83;; # \magstep7 - # The new convention is to have three or four letters for the - # font name and four digits for the pointsize. The number is - # pointsize * 100. We effectively divide by 100 by ignoring the - # last two digits. - ????|?????) realsize=`echo "$pointsize" | sed 's/\(..\)$/.\1/'`;; - *) realsize="$pointsize";; -esac - -mfname="$name.mf" -if test -r "$mfname"; then - echo "$progname: $destdir/$mfname already exists." - echo "$destdir/$mfname" >$STDOUT - "$MT_MKTEXUPD" "$destdir" "$mfname" - exit 0 -fi - -case "$name" in - ec*|tc*) - cat > "mf$$.tmp" <<END -if unknown exbase: input exbase fi; -gensize:=$realsize; -generate $rootname; -END - ;; - dc*) - cat > "mf$$.tmp" <<END -if unknown dxbase: input dxbase fi; -gensize:=$realsize; -generate $rootname; -END - ;; - cs*|lcsss*|icscsc*|icstt*|ilcsss*) - cat > "mf$$.tmp" <<END -input cscode -use_driver; -END - ;; - wn[bcdfirstuv]*|rx[bcdfiorstuvx][bcfhilmostx]*|l[abcdhl][bcdfiorstuvx]*) - cat > "mf$$.tmp" <<END -input fikparm; -END - ;; - g[lmorst][bijmtwx][cilnoru]*) - # A small superset of the names of the cbgreek fonts. - cat > "mf$$.tmp" <<END -% generated by mktexmf -input cbgreek; -END - ;; - *) - cat > "mf$$.tmp" <<END -design_size := $realsize; -input $rootname; -END - ;; -esac - -chmod `kpsestat -xst,go-w .` "mf$$.tmp" -rm -f "$mfname" -mv "mf$$.tmp" "$mfname" - -echo "$destdir/$mfname" >$STDOUT -echo "$progname: $destdir/$mfname: successfully generated." >&2 -"$MT_MKTEXUPD" "$destdir" "$mfname" -exit 0 -) 1>&2 </dev/null +../../texmf-dist/scripts/texlive/mktexmf
\ No newline at end of file diff --git a/Master/bin/aarch64-linux/mktexpk b/Master/bin/aarch64-linux/mktexpk index 2672dc7f78c..a0d6db0121b 100755..120000 --- a/Master/bin/aarch64-linux/mktexpk +++ b/Master/bin/aarch64-linux/mktexpk @@ -1,284 +1 @@ -#!/bin/sh -# original mktexpk -- make a new PK font, because one wasn't found. -# -# (If you change or delete the word `original' on the previous line, -# installation won't write this script over yours.) -# -# Originally written by Thomas Esser, Karl Berry, and Olaf Weber. -# Public domain. - -version='$Id: mktexpk 34656 2014-07-18 23:38:50Z karl $' -progname=`echo $0 | sed 's%.*/%%'` - -# preferentially use subprograms from our own directory. -mydir=`echo "$0" | sed 's,/[^/]*$,,'` -mydir=`cd "$mydir" && pwd` -PATH="$mydir:$PATH"; export PATH - -usage="Usage: $progname [OPTIONS] NAME [REDIRECT], - Create a PK font. - ---dpi DPI use resolution DPI. ---bdpi BDPI use base resolution BDPI. ---mag MAG use magnificiation MAG. ---mfmode MODE use MODE as the METAFONT mode. ---destdir DESTDIR write fonts in DESTDIR. - -Try to create a bitmap PK file for NAME at resolution DPI, with an -assumed device base resolution of BDPI, and a Metafont \`mag' of -MAG. Use MODE for the METAFONT mode. Use DESTDIR for the root of where -to install into, either the absolute directory name to use (if it starts -with a /) or relative to the default DESTDIR (if not). REDIRECT, if -supplied, is a string of the form '>&n', where n is the number of the -file descriptor which is to receive, instead of stdout, the name of the -newly created pk file. - -If you expected the font to be available as an outline, and thus this -script does not work and should not have been called, most likely the -font's .tfm name is missing from the relevant map file (e.g., -psfonts.map for dvips, pdftex.map for pdftex). These map files are -typically maintained using updmap; q.v. - -For step-by-step instructions on making new fonts known to TeX, see -http://tug.org/fonts/fontinstall.html. - -Report bugs to: tex-k@tug.org -TeX Live home page: <http://tug.org/texlive/> -" - -# Handle non-positional options, except for --version/--help -while test $# -gt 0; do - case "$1" in - --destdir) shift; DEST="$1"; shift ;; - --destdir=*) DEST=`echo "$1" | sed 's/--destdir=//'`; shift ;; - --dpi) shift; DPI="$1"; shift ;; - --dpi=*) DPI=`echo "$1" | sed 's/--dpi=//'`; shift ;; - --bdpi) shift; BDPI="$1"; shift ;; - --bdpi=*) BDPI=`echo "$1" | sed 's/--bdpi=//'`; shift ;; - --mfmode) shift; test "x$1" != "x/" && MODE="$1"; shift ;; - --mfmode=*) test "x$1" != "x--mfmode/" \ - && MODE=`echo "$1" | sed 's/--mfmode=//'`; shift ;; - --mag) shift; MAG="$1"; shift;; - --mag=*) MAG=`echo "$1" | sed '/s--mag=//'`; shift;; - --version|-version) break ;; - --help|-help) break ;; - *) break ;; - esac -done - -if test "x$2" != x; then - tail="`echo \"x$2\" | sed 's/^x>&//' | grep '^[0-9]*$'`" - if test -z "$tail"; then - echo "$progname: argument '$2' ignored - bad file number" >&2 - elif test "$tail" != 1; then - eval 'exec 1>&$tail' - fi -fi - -mt_max_args=2 - -# Common code for all scripts. -: ${MT_TEXMFMAIN=`kpsewhich --expand-path='$TEXMFMAIN'`} -: ${MT_MKTEX_OPT=`kpsewhich --format='web2c files' mktex.opt`} -test -n "$MT_MKTEX_OPT" || MT_MKTEX_OPT="$MT_TEXMFMAIN/web2c/mktex.opt" -if test ! -f "$MT_MKTEX_OPT"; then - echo "$progname: Cannot find mktex.opt; check your installation." >&2 - exit 1 -fi - -. "$MT_MKTEX_OPT" - -# Where do potential driver files belong? -case "$MT_FEATURES" in - *nomfdrivers*) - : ${MT_MFDESTDIR=`pwd`} - export MT_MFDESTDIR;; -esac - -# Since we want to pass the generated filename and only that filename -# back to the caller on standard output, we do some redirections so -# regular echo's will end up on stderr, and do an echo >$STDOUT at the end. -# Then the contents of $STDOUT will be echoed to stdout by a trap. - -# start of redirection stdout -> stderr, stdin <- /dev/null -( - -NAME=$1 - -if kpsewhich $NAME.mf >/dev/null 2>&1 || mktexmf $NAME >/dev/null 2>&1; then - # determine the progname of metafont to use; prefer mf-nowin. - if (mf-nowin --version) >/dev/null 2>&1; then - MF="mf-nowin -progname=mf" - else - MF=mf - fi - - # Check that $BDPI and $MODE are consistent; if not, ignore the mode and - # hope we can correctly guess it from bdpi. (People like to specify the - # resolution on the command line, not the mode so much.) - if test -n "$MODE"; then - mf_bdpi=`$MF \ -'\mode:='$MODE';mode_setup;message"BDPI= "&decimal round pixels_per_inch;end.'\ - </dev/null \ - | awk '/DPI=/ {print $2}'` - if test "x$mf_bdpi" != x$BDPI; then - echo "$progname: Mismatched mode $MODE and resolution $BDPI; ignoring mode." >&2 - MODE= - fi - fi - - # If an explicit mode is not supplied, try to guess. You can get a - # list of extant modes from ftp://ftp.tug.org/tex/modes.mf. - if test -z "$MODE" || test "x$MODE" = xdefault; then - case "$BDPI" in - 85) MODE=sun;; - 100) MODE=nextscrn;; - 180) MODE=toshiba;; - 300) MODE=cx;; - 360) MODE=epstylus;; - 400) MODE=nexthi;; - 600) MODE=ljfour;; - 720) MODE=epscszz;; - 1200) MODE=ultre;; - 1270) MODE=linoone;; - 8000) MODE=dpdfezzz;; - *) echo "$progname: Can't guess mode for $BDPI dpi devices." >&2 - echo "$progname: Use a config file or option to specify the mode; see:" >&2 - echo "$progname: http://tug.org/texinfohtml/kpathsea.html#Unable-to-generate-fonts" >&2 - exit 1 - esac - fi - - # Run Metafont. Always use plain Metafont, since reading cmbase.mf - # does not noticeably slow things down. - cmd="$MF \mode:=$MODE; mag:=$MAG; nonstopmode; input $NAME" -else - MODE=modeless - # ps_to_pk is set in mktex.opt - case $ps_to_pk in - gsftopk) - if $ps_to_pk -t "$NAME"; then - cmd="$ps_to_pk $NAME $DPI" - fi;; - ps2pk) - # grep for the font in $PSMAPFILE. These are base font names, such as - # rpplr (the original) or pplr0 (an interim step) or pplr8r (current). - : ${PSMAPFILE=`kpsewhich --format=map psfonts.map ps2pk.map`} - pattern="^$NAME"'([ ]|$)' - psline=`egrep "$pattern" $PSMAPFILE | tail -1` - if test -n "$psline"; then - set x `echo "$psline" | sed 's%[<["]%%g'` - shift; shift; shift; - encoding=; psname=; slant=; extend= - while test ! -z "$1"; do - case "$1" in - *.enc) encoding="-e $1";; - *.pf[ab]) psname="$1";; - *SlantFont) slant="-S $lastopt";; - *ExtendFont) extend="-E $lastopt";; - esac - lastopt="$1" - shift - done - # Guessing the name of the type1 font file as fallback: - ANAME=`echo $NAME | sed 's/8r$/8a/'` - for i in $NAME.pfa $NAME.pfb $ANAME.pfa $ANAME.pfb; do - if kpsewhich $i >/dev/null 2>&1; then - psname=$i - break - fi - done - - if [ -n "$psname" ]; then - cmd="ps2pk -v -X$DPI -R$BDPI $slant $extend $encoding $psname $NAME.${DPI}pk" - else - if gsftopk -t "$NAME"; then - echo "$progname: cannot find $NAME.pfa or $NAME.pfb. Trying gsftopk." >&2 - cmd="gsftopk $NAME $DPI" - fi - fi - fi;; - esac - - # unsupported by $ps_to_pk, try other conversions: - if test -z "$cmd"; then - if (ttf2pk -t -q $NAME) >/dev/null 2>&1; then - cmd="ttf2pk -q $NAME $DPI" - elif (hbf2gf -t -q $NAME) >/dev/null 2>&1; then - cmd="hbf2gf -q -p $NAME $DPI" - else - echo "$progname: don't know how to create bitmap font for $NAME." >&2 - echo "$progname: perhaps $NAME is missing from the map file." >&2 - exit 1 - fi - fi -fi - -OIFS=$IFS; IFS=$SEP -set x `"$MT_MKTEXNAM" $NAME $DPI $MODE $DEST`; shift -IFS=$OIFS - -PKDEST="$1" -PKDESTDIR=`echo "$PKDEST" | sed 's%/[^/][^/]*$%%'` # can't rely on dirname -PKNAME=`basename "$PKDEST"` -GFNAME=$NAME.${DPI}gf - -if test -r "$PKDESTDIR/$PKNAME"; then - echo "$progname: $PKDESTDIR/$PKNAME already exists." >&2 - echo "$PKDESTDIR/$PKNAME" >$STDOUT - "$MT_MKTEXUPD" "$PKDESTDIR" $PKNAME - exit 0 -fi - -"$MT_MKTEXDIR" "$PKDESTDIR" -if test ! -d "$PKDESTDIR"; then - echo "$progname: $MT_MKTEXDIR $PKDESTDIR failed." >&2 - exit 1 -fi - -echo "$progname: Running $cmd" -$cmd </dev/null || { - # Don't abort if only "Strange path", "bad pos" or "angle(0,0)" - # errors occurr. - grep '^!' $NAME.log | sort >$$.errs 2>/dev/null - grep '^! Strange path' $$.errs >$$.strange 2>/dev/null - grep '^! bad pos.' $$.errs >$$.badpos 2>/dev/null - grep '^! angle(0,0) is taken as zero.' $$.errs >$$.angle 2>/dev/null - cat $$.badpos $$.strange $$.angle | sort > $$.errs_accept - if cmp $$.errs $$.errs_accept >/dev/null 2>&1; then - test -s $$.strange >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused strange path errors." >&2 - test -s $$.badpos >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused bad pos errors." >&2 - test -s $$.angle >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused angle(0,0) errors." >&2 - else - echo "$progname: \`$cmd' failed." >&2 - test -s $NAME.log && mv -f $NAME.log "$KPSE_DOT" - exit 1; - fi -} - -test -r $GFNAME && { gftopk ./$GFNAME $PKNAME || exit 1; } -test ! -f $PKNAME && test -f $NAME.${DPI}pk && mv $NAME.${DPI}pk $PKNAME -if test ! -s $PKNAME; then - echo "$progname: \`$cmd' failed to make $PKNAME." >&2 - exit 1 -fi - -# Install the PK file carefully, since others may be working simultaneously. -# Use cp when mv fails, since DOS will fail mv for deeply-nested directories. -mv $PKNAME "$PKDESTDIR/pk$$.tmp" 2>/dev/null \ - || cp $PKNAME "$PKDESTDIR/pk$$.tmp" || exit 1 -cd "$PKDESTDIR" || exit 1 -chmod `kpsestat -xst,go-w .` pk$$.tmp -test -r $PKNAME || mv pk$$.tmp $PKNAME || exit 1 - -# Update ls-R if necessary. -"$MT_MKTEXUPD" "$PKDESTDIR" $PKNAME - -# If this line (or an equivalent) is not present, dvipsk/xdvik/dviljk -# will think mktexpk failed. Any other output to stdout will also lose. -echo "$PKDESTDIR/$PKNAME" >$STDOUT -echo "$progname: $PKDESTDIR/$PKNAME: successfully generated." >&2 -) 1>&2 </dev/null +../../texmf-dist/scripts/texlive/mktexpk
\ No newline at end of file diff --git a/Master/bin/aarch64-linux/mktextfm b/Master/bin/aarch64-linux/mktextfm index 46e30a9c5dc..70ae3a438ce 100755..120000 --- a/Master/bin/aarch64-linux/mktextfm +++ b/Master/bin/aarch64-linux/mktextfm @@ -1,162 +1 @@ -#!/bin/sh -# original mktextfm -- make a new TFM file, because one wasn't found. -# -# (If you change or delete the word `original' on the previous line, -# installation won't write this script over yours.) -# -# Primarily written by Thomas Esser, Karl Berry, and Olaf Weber. -# Public domain. - -version='$Id: mktextfm 34656 2014-07-18 23:38:50Z karl $' -progname=`echo $0 | sed 's%.*/%%'` - -# preferentially use subprograms from our own directory. -mydir=`echo "$0" | sed 's,/[^/]*$,,'` -mydir=`cd "$mydir" && pwd` -PATH="$mydir:$PATH"; export PATH - -usage="Usage: $progname [--destdir DESTDIR] FONT. - -Makes a TFM file for FONT, if possible. Use DESTDIR for the root of where -to install into, either the absolute directory name to use (if it starts -with a /) or relative to the default DESTDIR (if not). - -Report bugs to: tex-k@tug.org -TeX Live home page: <http://tug.org/texlive/> -" - -# Handle non-positional options, except for --version/--help -while test $# -gt 0; do - case "$1" in - --destdir) shift; DEST="$1"; shift ;; - --destdir=*) DEST=`echo "$1" | sed 's/--destdir=//'`; shift ;; - --version|-version) break ;; - --help|-help) break ;; - *) break ;; - esac -done - -# Common code for all scripts. -: ${MT_TEXMFMAIN=`kpsewhich --expand-path='$TEXMFMAIN'`} -: ${MT_MKTEX_OPT=`kpsewhich --format='web2c files' mktex.opt`} -test -n "$MT_MKTEX_OPT" || MT_MKTEX_OPT="$MT_TEXMFMAIN/web2c/mktex.opt" -if test ! -f "$MT_MKTEX_OPT"; then - echo "$progname: Cannot find mktex.opt; check your installation." >&2 - exit 1 -fi - -. "$MT_MKTEX_OPT" - -# Where do potential mf driver files go? -case "$MT_FEATURES" in - *nomfdrivers*) - : ${MT_MFDESTDIR=`pwd`} - export MT_MFDESTDIR;; -esac - -# start of redirection stdout -> stderr, stdin <- /dev/null -( - -NAME=`basename "$1" .tfm` -MAG=1 # mag=0 fails with larm1000.mf -#DEST="$2" -DPI=$BDPI - -OIFS=$IFS; IFS=$SEP -set x `"$MT_MKTEXNAM" $NAME $DPI $MODE $DEST`; shift -IFS=$OIFS - -PKDEST="$1" -TFMDEST="$2" -PKDESTDIR=`echo "$PKDEST" | sed 's%/[^/][^/]*$%%'` # can't rely on dirname -TFMDESTDIR=`echo "$TFMDEST" | sed 's%/[^/][^/]*$%%'` -PKNAME=`basename "$PKDEST"` -TFMNAME=$NAME.tfm -GFNAME=$NAME.$DPI'gf' - -if test -r "$TFMDESTDIR/$TFMNAME"; then - echo "$progname: $TFMDESTDIR/$TFMNAME already exists." >&2 - echo "$TFMDESTDIR/$TFMNAME" >$STDOUT - "$MT_MKTEXUPD" "$TFMDESTDIR" $TFMNAME - exit -fi - -# Try to create the destdir first. Do not create fonts, if this fails. -"$MT_MKTEXDIR" "$TFMDESTDIR" -if test ! -d "$TFMDESTDIR"; then - echo "$progname: mktexdir $TFMDESTDIR failed." - exit 1 -fi - -# Check if this font is supported by hbf2gf else use metafont. -if (hbf2gf -q -t $NAME) >/dev/null 2>&1; then - cmd="hbf2gf -g $NAME $DPI" -else - # determine the progname of metafont to use; prefer mf-nowin. - if (mf-nowin --version) >/dev/null 2>&1; then - MF="mf-nowin -progname=mf" - else - MF=mf - fi - - cmd="$MF \mode:=$MODE; mag:=$MAG; nonstopmode; input $NAME" -fi - -echo "$progname: Running $cmd" -$cmd </dev/null || { - # Don't abort if only "Strange path", "bad pos" or "angle(0,0)" - # errors occurr. - grep '^!' $NAME.log | sort >$$.errs 2>/dev/null - grep '^! Strange path' $$.errs >$$.strange 2>/dev/null - grep '^! bad pos.' $$.errs >$$.badpos 2>/dev/null - grep '^! angle(0,0) is taken as zero.' $$.errs >$$.angle 2>/dev/null - cat $$.badpos $$.strange $$.angle | sort > $$.errs_accept - if cmp $$.errs $$.errs_accept >/dev/null 2>&1; then - test -s $$.strange >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused strange path errors." >&2 - test -s $$.badpos >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused bad pos errors." >&2 - test -s $$.angle >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused angle(0,0) errors." >&2 - else - echo "$progname: \`$cmd' failed." >&2 - test -s $NAME.log && mv -f $NAME.log "$KPSE_DOT" - exit 1; - fi -} - -# hbf2gf just produces a .pl file: -test -r ./$NAME.pl && pltotf ./$NAME.pl $TFMNAME -test -r $TFMNAME || { echo "$progname: \`$cmd' failed to make $TFMNAME."; exit 1; } - -# Install the TFM file carefully, since others may be working simultaneously. -# Use cp when mv fails, since DOS will fail mv for deeply-nested directories. -mv $TFMNAME "$TFMDESTDIR/tfm$$.tmp" 2>/dev/null \ - || cp $TFMNAME "$TFMDESTDIR/tfm$$.tmp" || exit 1 -cd "$TFMDESTDIR" || exit 1 -chmod `kpsestat -xst,go-w .` tfm$$.tmp -test -r $TFMNAME || mv tfm$$.tmp $TFMNAME || exit 1 - -# OK, success with the TFM. -"$MT_MKTEXUPD" "$TFMDESTDIR" $TFMNAME -echo "$TFMDESTDIR/$TFMNAME" >$STDOUT -echo "$progname: $TFMDESTDIR/$TFMNAME: successfully generated." >&2 - -# Since we probably made a GF(->PK) file, too, may as well install it if -# it's needed. -cd $TEMPDIR -if test -r $GFNAME && test ! -f "$PKDESTDIR/$PKNAME"; then - gftopk ./$GFNAME $PKNAME || exit 1 - "$MT_MKTEXDIR" "$PKDESTDIR" - mv $PKNAME "$PKDESTDIR/pk$$.tmp" 2>/dev/null \ - || cp $PKNAME "$PKDESTDIR/pk$$.tmp" || exit 1 - cd "$PKDESTDIR" || exit 1 - if test -f $PKNAME; then - rm -f pk$$.tmp - else - chmod `kpsestat -xst,go-w .` pk$$.tmp - mv pk$$.tmp $PKNAME - "$MT_MKTEXUPD" "$PKDESTDIR" $PKNAME - fi -fi -) 1>&2 </dev/null +../../texmf-dist/scripts/texlive/mktextfm
\ No newline at end of file diff --git a/Master/bin/amd64-freebsd/mktexlsr b/Master/bin/amd64-freebsd/mktexlsr index 5fde39e2c2d..a36378a2b9f 100755..120000 --- a/Master/bin/amd64-freebsd/mktexlsr +++ b/Master/bin/amd64-freebsd/mktexlsr @@ -1,236 +1 @@ -#!/bin/sh -# original mktexlsr -- create or rebuild ls-R. -# -# (If you change or delete the word `original' on the previous line, -# installation won't write this script over yours.) -# -# Suitable for calling from cron, as in: -# 0 * * * * cd /your/texmf/root && /usr/local/texlive/bin/mktexlsr -# -# Originally written as `texhash' by Thomas Esser, Okt., 1994. -# Public domain. - -version='$Id: mktexlsr 46343 2018-01-17 00:55:32Z preining $' -progname=`echo $0 | sed 's%.*/%%'` - -usage="Usage: $progname [OPTION]... [DIR]... - -Rebuild ls-R filename databases used by TeX. If one or more arguments -DIRS are given, these are used as the directories in which to build -ls-R. Else all directories in the search path for ls-R files -(\$TEXMFDBS) are used. - -Options: - --dry-run do not actually update anything - --help display this help and exit - --quiet cancel --verbose - --silent same as --quiet - --verbose explain what is being done - --version output version information and exit - -If standard input is a terminal, --verbose is on by default. - -For more information, see the \`Filename database' section of -Kpathsea manual available at http://tug.org/kpathsea. - -Report bugs to: tex-k@tug.org -TeX Live home page: <http://tug.org/texlive/> -" - -# The simple PATH-prepending approach we take in other scripts doesn't -# handle DOS/Windows, but we don't use the shell scripts on Windows -# anyway, and does anyone want current TL on DOS or DJGPP? Maybe they -# can maintain their own changes if so. Leaving this code though, since -# it's always been here ... - -# MS-DOS and MS-Windows define $COMSPEC or $ComSpec and use `;' to separate -# directories in path lists whereas Unix uses `:'. Make an exception for -# Cygwin, which pretends to be UNIX. -# Create a variable that holds the right character to be used by the scripts. -DOSISH=no -case `uname -s` in - CYGWIN*|Cygwin*|cygwin*) ;; - *) if test -n "$COMSPEC" || test -n "$ComSpec"; then DOSISH=yes; fi -esac -if test "$DOSISH" = "no"; then SEP=':'; else SEP=';';fi - -# Add the location of the script to the PATH if necessary. This must -# be done before kpsewhich can be called, and thus cannot be put into -# mktex.opt. -dirname=`echo $0 | sed 's%/*[^/][^/]*$%%'` -case $dirname in - "") # Do nothing - ;; - /* | [A-z]:/*) # Absolute name - PATH="$dirname$SEP$PATH" - export PATH ;; - *) # Relative name - PATH="`pwd`/$dirname$SEP$PATH" - export PATH ;; -esac - -if tty -s; then verbose=true; else verbose=false; fi -dry_run=false -trees= - -# initialize treefile by either mktemp or some random name -# code taken from pdfjam and adjusted -{ - treefile=` - (umask 077 && mktemp "${TMPDIR-/tmp}/mktexlsrtrees.XXXXXXXXXX") 2>/dev/null - ` && test -n "$treefile" && test -f "$treefile" -} || { - ## We'll use awk to make random number, for portability - random=`awk 'END { srand(); printf ("%d\n", rand()*1000000); }' /dev/null` - treefile="${TMPDIR-/tmp}/mktexlsrtrees$$.$random" -} || exit $? - -trap 'cd /; rm -f $treefile; test -z "$db_dir_tmp" || rm -rf "$db_dir_tmp"; - exit' 0 1 2 3 7 13 15 - -# A copy of some stuff from mktex.opt, so we can run in the presence of -# terminally damaged ls-R files. -while test $# -gt 0; do - if test "x$1" = x--help || test "x$1" = x-help; then - echo "$usage" - exit 0 - elif test "x$1" = x--version || test "x$1" = x-version; then - echo "`basename $0` $version" - kpsewhich --version - exit 0 - elif test "x$1" = x--verbose || test "x$1" = x-verbose; then - verbose=true - elif test "x$1" = x--dry-run || test "x$1" = x-n; then - dry_run=true - elif test "x$1" = x--quiet || test "x$1" = x--silent \ - || test "x$1" = x-quiet || test "x$1" = x-silent ; then - verbose=false - elif test "x$1" = x--; then - : - elif echo "x$1" | grep '^x-' >/dev/null; then - echo "$progname: unknown option \`$1', try --help if you need it." >&2 - exit 1 - else - if test ! -d "$1"; then - echo "$progname: $1: not a directory, skipping." >&2 - shift - continue - fi - # By saving the argument in a file, we can later get it back while - # supporting spaces in the name. This still doesn't support - # newlines in the directory names, but nobody ever complains about - # that, and it seems much too much trouble to use \0 terminators. - (umask 077 - if echo "$1" >>"$treefile"; then :; else - echo "$progname: $treefile: could not append to arg file, goodbye." >&2 - exit 1 - fi - ) - fi - shift -done - -# mktexupd and mktexlsr make sure they're coordinated via this. A copy -# is found mktex.opt. -ls_R_magic='% ls-R -- filename database for kpathsea; do not change this line.' -# The old string, which should continue to work. -old_ls_R_magic='% ls-R -- maintained by MakeTeXls-R; do not change this line.' - -{ - # Get list of directories from the explicit arguments (now saved in - # $treefile), or $TEXMFDBS if no explicit args. Eliminate duplicates. - saveIFS=$IFS # break only at newline - IFS=' -' - if test -s "$treefile"; then - set x `sort "$treefile" | uniq` - else - set x `kpsewhich --show-path=ls-R | tr : ' -' | sort | uniq` - fi - IFS=$saveIFS - shift -} - -for TEXMFLS_R in "$@"; do - # Prepend cwd if the directory was relative. - case "$TEXMFLS_R" in - "") continue ;; # Strictly speaking, it is an error if this case is taken. - /* | [A-z]:/*) ;; - *) TEXMFLS_R="`pwd`/$TEXMFLS_R" - esac - # Allow for either ls-R and ls-r to exist. But create ls-R if we're - # working from scratch. - if test -f "$TEXMFLS_R/ls-R"; then - db_file="$TEXMFLS_R/ls-R" - elif test -f "$TEXMFLS_R/ls-r"; then - db_file="$TEXMFLS_R/ls-r" - else - db_file="$TEXMFLS_R/ls-R" - fi - # Follow a possible symlink to get the right filesystem. - # The '|| true' construct prevents an sh -e aborting. - db_readlink=`kpsereadlink "$TEXMFLS_R/ls-R" 2>/dev/null` || true - case "$db_readlink" in - "") ;; - /* | [A-z]:/*) db_file="$db_readlink" ;; - *) db_file="$TEXMFLS_R/$db_readlink" - esac - db_dir=`echo "$db_file" | sed 's%/[^/][^/]*$%%'` # can't rely on dirname - - # want to be silent if the directory doesn't exist, since the ls-R - # path ordinarily contains many nonexistent directories. - test -d "$db_dir" || continue - test -w "$db_dir" || { echo "$progname: $db_dir: directory not writable. Skipping..." >&2; continue; } - - if test ! -f "$db_file"; then - cp /dev/null "$db_file" - # Use same permissions as parent directory, minus x,s, or t bits. - chmod `kpsestat -xst "$db_dir"` "$db_file" - elif test -s "$db_file" \ - && test "x`sed '1s/
$//;1q' \"$db_file\"`" != "x$ls_R_magic" \ - && test "x`sed '1s/
$//;1q' \"$db_file\"`" != "x$old_ls_R_magic"; then - echo "$progname: $db_file: no magic string, skipping..." >&2 - continue - fi - - # Skip if we cannot write the file: - kpseaccess -w "$db_file" || { echo "$progname: $db_file: no write permission, skipping..." >&2; continue; } - - db_dir_tmp="$db_dir/lsR$$.tmp" - (umask 077 && mkdir "$db_dir_tmp" ) \ - || { echo "$progname: $db_dir_tmp: could not create directory, skipping..." >&2; continue; } - db_file_tmp="$db_dir_tmp/lsR$$.tmp" - rm -f "$db_file_tmp" - - $verbose && echo "$progname: Updating $db_file... " - $dry_run && continue - - echo "$ls_R_magic" >"$db_file_tmp" - - # The main task. We put ./: in the output, so top-level files can be - # found via ls-R. Probably irrelevant in practice. The sed command - # inserts the leading ./ for directory names, and removes ., .., and - # version control entries from the list. Also omit contents of any - # the version directories; sed apparently requires that we do that - # operation in a separate invocation. We do not try to support colons - # in directory names. - # - echo "./:" >>"$db_file_tmp" - vc_dirs='\.\(bzr\|git\|hg\|svn\)\|_darcs' - (cd "$TEXMFLS_R" && \ls -LRa 2>/dev/null) \ - | sed -e '/^$/{n;s%^\./%%;s%^%./%;}; /^\.$/d; /^\.\.$/d; /^'$vc_dirs'$/d;' \ - -e '/^[\.\/]*lsR[0-9]*\.tmp:*$/d' \ - | sed -e /$vc_dirs'.*:$/,/^$/d' \ - >>"$db_file_tmp" - - # To be really safe, a loop. - until PERMS=`kpsestat = "$db_file"`; do sleep 1; done - chmod $PERMS "$db_file_tmp" - rm -f "$db_file" - mv "$db_file_tmp" "$db_file" - rm -rf "$db_dir_tmp" -done - -$verbose && echo "$progname: Done." -exit 0 +../../texmf-dist/scripts/texlive/mktexlsr
\ No newline at end of file diff --git a/Master/bin/amd64-freebsd/mktexmf b/Master/bin/amd64-freebsd/mktexmf index bb868c12a8d..302c00f763e 100755..120000 --- a/Master/bin/amd64-freebsd/mktexmf +++ b/Master/bin/amd64-freebsd/mktexmf @@ -1,151 +1 @@ -#!/bin/sh -# original mktexmf -- make a new MF file, because one wasn't found. -# -# (If you change or delete the word `original' on the previous line, -# installation won't write this script over yours.) -# -# Originally written by Thomas Esser. -# Public domain. - -version='$Id: mktexmf 34656 2014-07-18 23:38:50Z karl $' - -# preferentially use subprograms from our own directory. -mydir=`echo "$0" | sed 's,/[^/]*$,,'` -mydir=`cd "$mydir" && pwd` -PATH="$mydir:$PATH"; export PATH - -usage="Usage: $0 FONT. - -Makes the Metafont source file for FONT, if possible. For example, -\`ecr12' or \`cmr11'. - -Report bugs to: tex-k@tug.org -TeX Live home page: <http://tug.org/texlive/> -" - -# Common code for all scripts. -: ${MT_TEXMFMAIN=`kpsewhich --expand-path='$TEXMFMAIN'`} -: ${MT_MKTEX_OPT=`kpsewhich --format='web2c files' mktex.opt`} -test -n "$MT_MKTEX_OPT" || MT_MKTEX_OPT="$MT_TEXMFMAIN/web2c/mktex.opt" -if test ! -f "$MT_MKTEX_OPT"; then - echo "$progname: Cannot find mktex.opt; check your installation." >&2 - exit 1 -fi - -. "$MT_MKTEX_OPT" - -( -# See comments in mktexpk. -name="`echo $1 | sed 's%.*/%%; s%\.mf$%%'`" -rootname=`echo "$name" | sed 's/[0-9]*$//'` -pointsize=`echo "$name" | sed "s/^$rootname//"` - -sauterroot=`kpsewhich b-$rootname.mf 2>/dev/null` -if test -n "$sauterroot"; then - rootfile=$sauterroot - rootname=b-$rootname -else - case $name in - # csso12[0-5][0-9] from CJK package; unsupported by mktexmf - csso12[0-5][0-9]) - rootfile=;; - *) - case $rootname in - cs*|lcsss*|icscsc*|icstt*|ilcsss*) - rootfile=`kpsewhich cscode.mf`;; - wn[bcdfirstuv]*|rx[bcdfiorstuvx][bcfhilmostx]|l[abcdhl][bcdfiorstuvx]*) - lhprefix=`echo "$name" | sed 's/^\(..\).*/\1/'` - rootfile=`kpsewhich ${lhprefix}codes.mf 2>/dev/null`;; - *) - rootfile=`kpsewhich $rootname.mf 2>/dev/null`;; - esac;; - esac -fi -{ test -z "$rootfile" || test ! -f "$rootfile"; } && exit 1 - -#if test -z "$MT_MFNAME"; then -OIFS=$IFS; IFS=$SEP -set x `"$MT_MKTEXNAM" $name`; shift -IFS=$OIFS -MT_MFNAME="$3" -#fi - -destdir=`echo "$MT_MFNAME" | sed 's%/[^/][^/]*$%%'` -test -d "$destdir" || "$MT_MKTEXDIR" "$destdir" || exit 1 -cd "$destdir" || exit 1 - -case "$pointsize" in - "") echo "$progname: no pointsize."; exit 1;; - 11) realsize=10.95;; # \magstephalf - 14) realsize=14.4;; # \magstep2 - 17) realsize=17.28;; # \magstep3 - 20) realsize=20.74;; # \magstep4 - 25) realsize=24.88;; # \magstep5 - 30) realsize=29.86;; # \magstep6 - 36) realsize=35.83;; # \magstep7 - # The new convention is to have three or four letters for the - # font name and four digits for the pointsize. The number is - # pointsize * 100. We effectively divide by 100 by ignoring the - # last two digits. - ????|?????) realsize=`echo "$pointsize" | sed 's/\(..\)$/.\1/'`;; - *) realsize="$pointsize";; -esac - -mfname="$name.mf" -if test -r "$mfname"; then - echo "$progname: $destdir/$mfname already exists." - echo "$destdir/$mfname" >$STDOUT - "$MT_MKTEXUPD" "$destdir" "$mfname" - exit 0 -fi - -case "$name" in - ec*|tc*) - cat > "mf$$.tmp" <<END -if unknown exbase: input exbase fi; -gensize:=$realsize; -generate $rootname; -END - ;; - dc*) - cat > "mf$$.tmp" <<END -if unknown dxbase: input dxbase fi; -gensize:=$realsize; -generate $rootname; -END - ;; - cs*|lcsss*|icscsc*|icstt*|ilcsss*) - cat > "mf$$.tmp" <<END -input cscode -use_driver; -END - ;; - wn[bcdfirstuv]*|rx[bcdfiorstuvx][bcfhilmostx]*|l[abcdhl][bcdfiorstuvx]*) - cat > "mf$$.tmp" <<END -input fikparm; -END - ;; - g[lmorst][bijmtwx][cilnoru]*) - # A small superset of the names of the cbgreek fonts. - cat > "mf$$.tmp" <<END -% generated by mktexmf -input cbgreek; -END - ;; - *) - cat > "mf$$.tmp" <<END -design_size := $realsize; -input $rootname; -END - ;; -esac - -chmod `kpsestat -xst,go-w .` "mf$$.tmp" -rm -f "$mfname" -mv "mf$$.tmp" "$mfname" - -echo "$destdir/$mfname" >$STDOUT -echo "$progname: $destdir/$mfname: successfully generated." >&2 -"$MT_MKTEXUPD" "$destdir" "$mfname" -exit 0 -) 1>&2 </dev/null +../../texmf-dist/scripts/texlive/mktexmf
\ No newline at end of file diff --git a/Master/bin/amd64-freebsd/mktexpk b/Master/bin/amd64-freebsd/mktexpk index 2672dc7f78c..a0d6db0121b 100755..120000 --- a/Master/bin/amd64-freebsd/mktexpk +++ b/Master/bin/amd64-freebsd/mktexpk @@ -1,284 +1 @@ -#!/bin/sh -# original mktexpk -- make a new PK font, because one wasn't found. -# -# (If you change or delete the word `original' on the previous line, -# installation won't write this script over yours.) -# -# Originally written by Thomas Esser, Karl Berry, and Olaf Weber. -# Public domain. - -version='$Id: mktexpk 34656 2014-07-18 23:38:50Z karl $' -progname=`echo $0 | sed 's%.*/%%'` - -# preferentially use subprograms from our own directory. -mydir=`echo "$0" | sed 's,/[^/]*$,,'` -mydir=`cd "$mydir" && pwd` -PATH="$mydir:$PATH"; export PATH - -usage="Usage: $progname [OPTIONS] NAME [REDIRECT], - Create a PK font. - ---dpi DPI use resolution DPI. ---bdpi BDPI use base resolution BDPI. ---mag MAG use magnificiation MAG. ---mfmode MODE use MODE as the METAFONT mode. ---destdir DESTDIR write fonts in DESTDIR. - -Try to create a bitmap PK file for NAME at resolution DPI, with an -assumed device base resolution of BDPI, and a Metafont \`mag' of -MAG. Use MODE for the METAFONT mode. Use DESTDIR for the root of where -to install into, either the absolute directory name to use (if it starts -with a /) or relative to the default DESTDIR (if not). REDIRECT, if -supplied, is a string of the form '>&n', where n is the number of the -file descriptor which is to receive, instead of stdout, the name of the -newly created pk file. - -If you expected the font to be available as an outline, and thus this -script does not work and should not have been called, most likely the -font's .tfm name is missing from the relevant map file (e.g., -psfonts.map for dvips, pdftex.map for pdftex). These map files are -typically maintained using updmap; q.v. - -For step-by-step instructions on making new fonts known to TeX, see -http://tug.org/fonts/fontinstall.html. - -Report bugs to: tex-k@tug.org -TeX Live home page: <http://tug.org/texlive/> -" - -# Handle non-positional options, except for --version/--help -while test $# -gt 0; do - case "$1" in - --destdir) shift; DEST="$1"; shift ;; - --destdir=*) DEST=`echo "$1" | sed 's/--destdir=//'`; shift ;; - --dpi) shift; DPI="$1"; shift ;; - --dpi=*) DPI=`echo "$1" | sed 's/--dpi=//'`; shift ;; - --bdpi) shift; BDPI="$1"; shift ;; - --bdpi=*) BDPI=`echo "$1" | sed 's/--bdpi=//'`; shift ;; - --mfmode) shift; test "x$1" != "x/" && MODE="$1"; shift ;; - --mfmode=*) test "x$1" != "x--mfmode/" \ - && MODE=`echo "$1" | sed 's/--mfmode=//'`; shift ;; - --mag) shift; MAG="$1"; shift;; - --mag=*) MAG=`echo "$1" | sed '/s--mag=//'`; shift;; - --version|-version) break ;; - --help|-help) break ;; - *) break ;; - esac -done - -if test "x$2" != x; then - tail="`echo \"x$2\" | sed 's/^x>&//' | grep '^[0-9]*$'`" - if test -z "$tail"; then - echo "$progname: argument '$2' ignored - bad file number" >&2 - elif test "$tail" != 1; then - eval 'exec 1>&$tail' - fi -fi - -mt_max_args=2 - -# Common code for all scripts. -: ${MT_TEXMFMAIN=`kpsewhich --expand-path='$TEXMFMAIN'`} -: ${MT_MKTEX_OPT=`kpsewhich --format='web2c files' mktex.opt`} -test -n "$MT_MKTEX_OPT" || MT_MKTEX_OPT="$MT_TEXMFMAIN/web2c/mktex.opt" -if test ! -f "$MT_MKTEX_OPT"; then - echo "$progname: Cannot find mktex.opt; check your installation." >&2 - exit 1 -fi - -. "$MT_MKTEX_OPT" - -# Where do potential driver files belong? -case "$MT_FEATURES" in - *nomfdrivers*) - : ${MT_MFDESTDIR=`pwd`} - export MT_MFDESTDIR;; -esac - -# Since we want to pass the generated filename and only that filename -# back to the caller on standard output, we do some redirections so -# regular echo's will end up on stderr, and do an echo >$STDOUT at the end. -# Then the contents of $STDOUT will be echoed to stdout by a trap. - -# start of redirection stdout -> stderr, stdin <- /dev/null -( - -NAME=$1 - -if kpsewhich $NAME.mf >/dev/null 2>&1 || mktexmf $NAME >/dev/null 2>&1; then - # determine the progname of metafont to use; prefer mf-nowin. - if (mf-nowin --version) >/dev/null 2>&1; then - MF="mf-nowin -progname=mf" - else - MF=mf - fi - - # Check that $BDPI and $MODE are consistent; if not, ignore the mode and - # hope we can correctly guess it from bdpi. (People like to specify the - # resolution on the command line, not the mode so much.) - if test -n "$MODE"; then - mf_bdpi=`$MF \ -'\mode:='$MODE';mode_setup;message"BDPI= "&decimal round pixels_per_inch;end.'\ - </dev/null \ - | awk '/DPI=/ {print $2}'` - if test "x$mf_bdpi" != x$BDPI; then - echo "$progname: Mismatched mode $MODE and resolution $BDPI; ignoring mode." >&2 - MODE= - fi - fi - - # If an explicit mode is not supplied, try to guess. You can get a - # list of extant modes from ftp://ftp.tug.org/tex/modes.mf. - if test -z "$MODE" || test "x$MODE" = xdefault; then - case "$BDPI" in - 85) MODE=sun;; - 100) MODE=nextscrn;; - 180) MODE=toshiba;; - 300) MODE=cx;; - 360) MODE=epstylus;; - 400) MODE=nexthi;; - 600) MODE=ljfour;; - 720) MODE=epscszz;; - 1200) MODE=ultre;; - 1270) MODE=linoone;; - 8000) MODE=dpdfezzz;; - *) echo "$progname: Can't guess mode for $BDPI dpi devices." >&2 - echo "$progname: Use a config file or option to specify the mode; see:" >&2 - echo "$progname: http://tug.org/texinfohtml/kpathsea.html#Unable-to-generate-fonts" >&2 - exit 1 - esac - fi - - # Run Metafont. Always use plain Metafont, since reading cmbase.mf - # does not noticeably slow things down. - cmd="$MF \mode:=$MODE; mag:=$MAG; nonstopmode; input $NAME" -else - MODE=modeless - # ps_to_pk is set in mktex.opt - case $ps_to_pk in - gsftopk) - if $ps_to_pk -t "$NAME"; then - cmd="$ps_to_pk $NAME $DPI" - fi;; - ps2pk) - # grep for the font in $PSMAPFILE. These are base font names, such as - # rpplr (the original) or pplr0 (an interim step) or pplr8r (current). - : ${PSMAPFILE=`kpsewhich --format=map psfonts.map ps2pk.map`} - pattern="^$NAME"'([ ]|$)' - psline=`egrep "$pattern" $PSMAPFILE | tail -1` - if test -n "$psline"; then - set x `echo "$psline" | sed 's%[<["]%%g'` - shift; shift; shift; - encoding=; psname=; slant=; extend= - while test ! -z "$1"; do - case "$1" in - *.enc) encoding="-e $1";; - *.pf[ab]) psname="$1";; - *SlantFont) slant="-S $lastopt";; - *ExtendFont) extend="-E $lastopt";; - esac - lastopt="$1" - shift - done - # Guessing the name of the type1 font file as fallback: - ANAME=`echo $NAME | sed 's/8r$/8a/'` - for i in $NAME.pfa $NAME.pfb $ANAME.pfa $ANAME.pfb; do - if kpsewhich $i >/dev/null 2>&1; then - psname=$i - break - fi - done - - if [ -n "$psname" ]; then - cmd="ps2pk -v -X$DPI -R$BDPI $slant $extend $encoding $psname $NAME.${DPI}pk" - else - if gsftopk -t "$NAME"; then - echo "$progname: cannot find $NAME.pfa or $NAME.pfb. Trying gsftopk." >&2 - cmd="gsftopk $NAME $DPI" - fi - fi - fi;; - esac - - # unsupported by $ps_to_pk, try other conversions: - if test -z "$cmd"; then - if (ttf2pk -t -q $NAME) >/dev/null 2>&1; then - cmd="ttf2pk -q $NAME $DPI" - elif (hbf2gf -t -q $NAME) >/dev/null 2>&1; then - cmd="hbf2gf -q -p $NAME $DPI" - else - echo "$progname: don't know how to create bitmap font for $NAME." >&2 - echo "$progname: perhaps $NAME is missing from the map file." >&2 - exit 1 - fi - fi -fi - -OIFS=$IFS; IFS=$SEP -set x `"$MT_MKTEXNAM" $NAME $DPI $MODE $DEST`; shift -IFS=$OIFS - -PKDEST="$1" -PKDESTDIR=`echo "$PKDEST" | sed 's%/[^/][^/]*$%%'` # can't rely on dirname -PKNAME=`basename "$PKDEST"` -GFNAME=$NAME.${DPI}gf - -if test -r "$PKDESTDIR/$PKNAME"; then - echo "$progname: $PKDESTDIR/$PKNAME already exists." >&2 - echo "$PKDESTDIR/$PKNAME" >$STDOUT - "$MT_MKTEXUPD" "$PKDESTDIR" $PKNAME - exit 0 -fi - -"$MT_MKTEXDIR" "$PKDESTDIR" -if test ! -d "$PKDESTDIR"; then - echo "$progname: $MT_MKTEXDIR $PKDESTDIR failed." >&2 - exit 1 -fi - -echo "$progname: Running $cmd" -$cmd </dev/null || { - # Don't abort if only "Strange path", "bad pos" or "angle(0,0)" - # errors occurr. - grep '^!' $NAME.log | sort >$$.errs 2>/dev/null - grep '^! Strange path' $$.errs >$$.strange 2>/dev/null - grep '^! bad pos.' $$.errs >$$.badpos 2>/dev/null - grep '^! angle(0,0) is taken as zero.' $$.errs >$$.angle 2>/dev/null - cat $$.badpos $$.strange $$.angle | sort > $$.errs_accept - if cmp $$.errs $$.errs_accept >/dev/null 2>&1; then - test -s $$.strange >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused strange path errors." >&2 - test -s $$.badpos >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused bad pos errors." >&2 - test -s $$.angle >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused angle(0,0) errors." >&2 - else - echo "$progname: \`$cmd' failed." >&2 - test -s $NAME.log && mv -f $NAME.log "$KPSE_DOT" - exit 1; - fi -} - -test -r $GFNAME && { gftopk ./$GFNAME $PKNAME || exit 1; } -test ! -f $PKNAME && test -f $NAME.${DPI}pk && mv $NAME.${DPI}pk $PKNAME -if test ! -s $PKNAME; then - echo "$progname: \`$cmd' failed to make $PKNAME." >&2 - exit 1 -fi - -# Install the PK file carefully, since others may be working simultaneously. -# Use cp when mv fails, since DOS will fail mv for deeply-nested directories. -mv $PKNAME "$PKDESTDIR/pk$$.tmp" 2>/dev/null \ - || cp $PKNAME "$PKDESTDIR/pk$$.tmp" || exit 1 -cd "$PKDESTDIR" || exit 1 -chmod `kpsestat -xst,go-w .` pk$$.tmp -test -r $PKNAME || mv pk$$.tmp $PKNAME || exit 1 - -# Update ls-R if necessary. -"$MT_MKTEXUPD" "$PKDESTDIR" $PKNAME - -# If this line (or an equivalent) is not present, dvipsk/xdvik/dviljk -# will think mktexpk failed. Any other output to stdout will also lose. -echo "$PKDESTDIR/$PKNAME" >$STDOUT -echo "$progname: $PKDESTDIR/$PKNAME: successfully generated." >&2 -) 1>&2 </dev/null +../../texmf-dist/scripts/texlive/mktexpk
\ No newline at end of file diff --git a/Master/bin/amd64-freebsd/mktextfm b/Master/bin/amd64-freebsd/mktextfm index 46e30a9c5dc..70ae3a438ce 100755..120000 --- a/Master/bin/amd64-freebsd/mktextfm +++ b/Master/bin/amd64-freebsd/mktextfm @@ -1,162 +1 @@ -#!/bin/sh -# original mktextfm -- make a new TFM file, because one wasn't found. -# -# (If you change or delete the word `original' on the previous line, -# installation won't write this script over yours.) -# -# Primarily written by Thomas Esser, Karl Berry, and Olaf Weber. -# Public domain. - -version='$Id: mktextfm 34656 2014-07-18 23:38:50Z karl $' -progname=`echo $0 | sed 's%.*/%%'` - -# preferentially use subprograms from our own directory. -mydir=`echo "$0" | sed 's,/[^/]*$,,'` -mydir=`cd "$mydir" && pwd` -PATH="$mydir:$PATH"; export PATH - -usage="Usage: $progname [--destdir DESTDIR] FONT. - -Makes a TFM file for FONT, if possible. Use DESTDIR for the root of where -to install into, either the absolute directory name to use (if it starts -with a /) or relative to the default DESTDIR (if not). - -Report bugs to: tex-k@tug.org -TeX Live home page: <http://tug.org/texlive/> -" - -# Handle non-positional options, except for --version/--help -while test $# -gt 0; do - case "$1" in - --destdir) shift; DEST="$1"; shift ;; - --destdir=*) DEST=`echo "$1" | sed 's/--destdir=//'`; shift ;; - --version|-version) break ;; - --help|-help) break ;; - *) break ;; - esac -done - -# Common code for all scripts. -: ${MT_TEXMFMAIN=`kpsewhich --expand-path='$TEXMFMAIN'`} -: ${MT_MKTEX_OPT=`kpsewhich --format='web2c files' mktex.opt`} -test -n "$MT_MKTEX_OPT" || MT_MKTEX_OPT="$MT_TEXMFMAIN/web2c/mktex.opt" -if test ! -f "$MT_MKTEX_OPT"; then - echo "$progname: Cannot find mktex.opt; check your installation." >&2 - exit 1 -fi - -. "$MT_MKTEX_OPT" - -# Where do potential mf driver files go? -case "$MT_FEATURES" in - *nomfdrivers*) - : ${MT_MFDESTDIR=`pwd`} - export MT_MFDESTDIR;; -esac - -# start of redirection stdout -> stderr, stdin <- /dev/null -( - -NAME=`basename "$1" .tfm` -MAG=1 # mag=0 fails with larm1000.mf -#DEST="$2" -DPI=$BDPI - -OIFS=$IFS; IFS=$SEP -set x `"$MT_MKTEXNAM" $NAME $DPI $MODE $DEST`; shift -IFS=$OIFS - -PKDEST="$1" -TFMDEST="$2" -PKDESTDIR=`echo "$PKDEST" | sed 's%/[^/][^/]*$%%'` # can't rely on dirname -TFMDESTDIR=`echo "$TFMDEST" | sed 's%/[^/][^/]*$%%'` -PKNAME=`basename "$PKDEST"` -TFMNAME=$NAME.tfm -GFNAME=$NAME.$DPI'gf' - -if test -r "$TFMDESTDIR/$TFMNAME"; then - echo "$progname: $TFMDESTDIR/$TFMNAME already exists." >&2 - echo "$TFMDESTDIR/$TFMNAME" >$STDOUT - "$MT_MKTEXUPD" "$TFMDESTDIR" $TFMNAME - exit -fi - -# Try to create the destdir first. Do not create fonts, if this fails. -"$MT_MKTEXDIR" "$TFMDESTDIR" -if test ! -d "$TFMDESTDIR"; then - echo "$progname: mktexdir $TFMDESTDIR failed." - exit 1 -fi - -# Check if this font is supported by hbf2gf else use metafont. -if (hbf2gf -q -t $NAME) >/dev/null 2>&1; then - cmd="hbf2gf -g $NAME $DPI" -else - # determine the progname of metafont to use; prefer mf-nowin. - if (mf-nowin --version) >/dev/null 2>&1; then - MF="mf-nowin -progname=mf" - else - MF=mf - fi - - cmd="$MF \mode:=$MODE; mag:=$MAG; nonstopmode; input $NAME" -fi - -echo "$progname: Running $cmd" -$cmd </dev/null || { - # Don't abort if only "Strange path", "bad pos" or "angle(0,0)" - # errors occurr. - grep '^!' $NAME.log | sort >$$.errs 2>/dev/null - grep '^! Strange path' $$.errs >$$.strange 2>/dev/null - grep '^! bad pos.' $$.errs >$$.badpos 2>/dev/null - grep '^! angle(0,0) is taken as zero.' $$.errs >$$.angle 2>/dev/null - cat $$.badpos $$.strange $$.angle | sort > $$.errs_accept - if cmp $$.errs $$.errs_accept >/dev/null 2>&1; then - test -s $$.strange >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused strange path errors." >&2 - test -s $$.badpos >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused bad pos errors." >&2 - test -s $$.angle >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused angle(0,0) errors." >&2 - else - echo "$progname: \`$cmd' failed." >&2 - test -s $NAME.log && mv -f $NAME.log "$KPSE_DOT" - exit 1; - fi -} - -# hbf2gf just produces a .pl file: -test -r ./$NAME.pl && pltotf ./$NAME.pl $TFMNAME -test -r $TFMNAME || { echo "$progname: \`$cmd' failed to make $TFMNAME."; exit 1; } - -# Install the TFM file carefully, since others may be working simultaneously. -# Use cp when mv fails, since DOS will fail mv for deeply-nested directories. -mv $TFMNAME "$TFMDESTDIR/tfm$$.tmp" 2>/dev/null \ - || cp $TFMNAME "$TFMDESTDIR/tfm$$.tmp" || exit 1 -cd "$TFMDESTDIR" || exit 1 -chmod `kpsestat -xst,go-w .` tfm$$.tmp -test -r $TFMNAME || mv tfm$$.tmp $TFMNAME || exit 1 - -# OK, success with the TFM. -"$MT_MKTEXUPD" "$TFMDESTDIR" $TFMNAME -echo "$TFMDESTDIR/$TFMNAME" >$STDOUT -echo "$progname: $TFMDESTDIR/$TFMNAME: successfully generated." >&2 - -# Since we probably made a GF(->PK) file, too, may as well install it if -# it's needed. -cd $TEMPDIR -if test -r $GFNAME && test ! -f "$PKDESTDIR/$PKNAME"; then - gftopk ./$GFNAME $PKNAME || exit 1 - "$MT_MKTEXDIR" "$PKDESTDIR" - mv $PKNAME "$PKDESTDIR/pk$$.tmp" 2>/dev/null \ - || cp $PKNAME "$PKDESTDIR/pk$$.tmp" || exit 1 - cd "$PKDESTDIR" || exit 1 - if test -f $PKNAME; then - rm -f pk$$.tmp - else - chmod `kpsestat -xst,go-w .` pk$$.tmp - mv pk$$.tmp $PKNAME - "$MT_MKTEXUPD" "$PKDESTDIR" $PKNAME - fi -fi -) 1>&2 </dev/null +../../texmf-dist/scripts/texlive/mktextfm
\ No newline at end of file diff --git a/Master/bin/amd64-netbsd/mktexlsr b/Master/bin/amd64-netbsd/mktexlsr index 5fde39e2c2d..a36378a2b9f 100755..120000 --- a/Master/bin/amd64-netbsd/mktexlsr +++ b/Master/bin/amd64-netbsd/mktexlsr @@ -1,236 +1 @@ -#!/bin/sh -# original mktexlsr -- create or rebuild ls-R. -# -# (If you change or delete the word `original' on the previous line, -# installation won't write this script over yours.) -# -# Suitable for calling from cron, as in: -# 0 * * * * cd /your/texmf/root && /usr/local/texlive/bin/mktexlsr -# -# Originally written as `texhash' by Thomas Esser, Okt., 1994. -# Public domain. - -version='$Id: mktexlsr 46343 2018-01-17 00:55:32Z preining $' -progname=`echo $0 | sed 's%.*/%%'` - -usage="Usage: $progname [OPTION]... [DIR]... - -Rebuild ls-R filename databases used by TeX. If one or more arguments -DIRS are given, these are used as the directories in which to build -ls-R. Else all directories in the search path for ls-R files -(\$TEXMFDBS) are used. - -Options: - --dry-run do not actually update anything - --help display this help and exit - --quiet cancel --verbose - --silent same as --quiet - --verbose explain what is being done - --version output version information and exit - -If standard input is a terminal, --verbose is on by default. - -For more information, see the \`Filename database' section of -Kpathsea manual available at http://tug.org/kpathsea. - -Report bugs to: tex-k@tug.org -TeX Live home page: <http://tug.org/texlive/> -" - -# The simple PATH-prepending approach we take in other scripts doesn't -# handle DOS/Windows, but we don't use the shell scripts on Windows -# anyway, and does anyone want current TL on DOS or DJGPP? Maybe they -# can maintain their own changes if so. Leaving this code though, since -# it's always been here ... - -# MS-DOS and MS-Windows define $COMSPEC or $ComSpec and use `;' to separate -# directories in path lists whereas Unix uses `:'. Make an exception for -# Cygwin, which pretends to be UNIX. -# Create a variable that holds the right character to be used by the scripts. -DOSISH=no -case `uname -s` in - CYGWIN*|Cygwin*|cygwin*) ;; - *) if test -n "$COMSPEC" || test -n "$ComSpec"; then DOSISH=yes; fi -esac -if test "$DOSISH" = "no"; then SEP=':'; else SEP=';';fi - -# Add the location of the script to the PATH if necessary. This must -# be done before kpsewhich can be called, and thus cannot be put into -# mktex.opt. -dirname=`echo $0 | sed 's%/*[^/][^/]*$%%'` -case $dirname in - "") # Do nothing - ;; - /* | [A-z]:/*) # Absolute name - PATH="$dirname$SEP$PATH" - export PATH ;; - *) # Relative name - PATH="`pwd`/$dirname$SEP$PATH" - export PATH ;; -esac - -if tty -s; then verbose=true; else verbose=false; fi -dry_run=false -trees= - -# initialize treefile by either mktemp or some random name -# code taken from pdfjam and adjusted -{ - treefile=` - (umask 077 && mktemp "${TMPDIR-/tmp}/mktexlsrtrees.XXXXXXXXXX") 2>/dev/null - ` && test -n "$treefile" && test -f "$treefile" -} || { - ## We'll use awk to make random number, for portability - random=`awk 'END { srand(); printf ("%d\n", rand()*1000000); }' /dev/null` - treefile="${TMPDIR-/tmp}/mktexlsrtrees$$.$random" -} || exit $? - -trap 'cd /; rm -f $treefile; test -z "$db_dir_tmp" || rm -rf "$db_dir_tmp"; - exit' 0 1 2 3 7 13 15 - -# A copy of some stuff from mktex.opt, so we can run in the presence of -# terminally damaged ls-R files. -while test $# -gt 0; do - if test "x$1" = x--help || test "x$1" = x-help; then - echo "$usage" - exit 0 - elif test "x$1" = x--version || test "x$1" = x-version; then - echo "`basename $0` $version" - kpsewhich --version - exit 0 - elif test "x$1" = x--verbose || test "x$1" = x-verbose; then - verbose=true - elif test "x$1" = x--dry-run || test "x$1" = x-n; then - dry_run=true - elif test "x$1" = x--quiet || test "x$1" = x--silent \ - || test "x$1" = x-quiet || test "x$1" = x-silent ; then - verbose=false - elif test "x$1" = x--; then - : - elif echo "x$1" | grep '^x-' >/dev/null; then - echo "$progname: unknown option \`$1', try --help if you need it." >&2 - exit 1 - else - if test ! -d "$1"; then - echo "$progname: $1: not a directory, skipping." >&2 - shift - continue - fi - # By saving the argument in a file, we can later get it back while - # supporting spaces in the name. This still doesn't support - # newlines in the directory names, but nobody ever complains about - # that, and it seems much too much trouble to use \0 terminators. - (umask 077 - if echo "$1" >>"$treefile"; then :; else - echo "$progname: $treefile: could not append to arg file, goodbye." >&2 - exit 1 - fi - ) - fi - shift -done - -# mktexupd and mktexlsr make sure they're coordinated via this. A copy -# is found mktex.opt. -ls_R_magic='% ls-R -- filename database for kpathsea; do not change this line.' -# The old string, which should continue to work. -old_ls_R_magic='% ls-R -- maintained by MakeTeXls-R; do not change this line.' - -{ - # Get list of directories from the explicit arguments (now saved in - # $treefile), or $TEXMFDBS if no explicit args. Eliminate duplicates. - saveIFS=$IFS # break only at newline - IFS=' -' - if test -s "$treefile"; then - set x `sort "$treefile" | uniq` - else - set x `kpsewhich --show-path=ls-R | tr : ' -' | sort | uniq` - fi - IFS=$saveIFS - shift -} - -for TEXMFLS_R in "$@"; do - # Prepend cwd if the directory was relative. - case "$TEXMFLS_R" in - "") continue ;; # Strictly speaking, it is an error if this case is taken. - /* | [A-z]:/*) ;; - *) TEXMFLS_R="`pwd`/$TEXMFLS_R" - esac - # Allow for either ls-R and ls-r to exist. But create ls-R if we're - # working from scratch. - if test -f "$TEXMFLS_R/ls-R"; then - db_file="$TEXMFLS_R/ls-R" - elif test -f "$TEXMFLS_R/ls-r"; then - db_file="$TEXMFLS_R/ls-r" - else - db_file="$TEXMFLS_R/ls-R" - fi - # Follow a possible symlink to get the right filesystem. - # The '|| true' construct prevents an sh -e aborting. - db_readlink=`kpsereadlink "$TEXMFLS_R/ls-R" 2>/dev/null` || true - case "$db_readlink" in - "") ;; - /* | [A-z]:/*) db_file="$db_readlink" ;; - *) db_file="$TEXMFLS_R/$db_readlink" - esac - db_dir=`echo "$db_file" | sed 's%/[^/][^/]*$%%'` # can't rely on dirname - - # want to be silent if the directory doesn't exist, since the ls-R - # path ordinarily contains many nonexistent directories. - test -d "$db_dir" || continue - test -w "$db_dir" || { echo "$progname: $db_dir: directory not writable. Skipping..." >&2; continue; } - - if test ! -f "$db_file"; then - cp /dev/null "$db_file" - # Use same permissions as parent directory, minus x,s, or t bits. - chmod `kpsestat -xst "$db_dir"` "$db_file" - elif test -s "$db_file" \ - && test "x`sed '1s/
$//;1q' \"$db_file\"`" != "x$ls_R_magic" \ - && test "x`sed '1s/
$//;1q' \"$db_file\"`" != "x$old_ls_R_magic"; then - echo "$progname: $db_file: no magic string, skipping..." >&2 - continue - fi - - # Skip if we cannot write the file: - kpseaccess -w "$db_file" || { echo "$progname: $db_file: no write permission, skipping..." >&2; continue; } - - db_dir_tmp="$db_dir/lsR$$.tmp" - (umask 077 && mkdir "$db_dir_tmp" ) \ - || { echo "$progname: $db_dir_tmp: could not create directory, skipping..." >&2; continue; } - db_file_tmp="$db_dir_tmp/lsR$$.tmp" - rm -f "$db_file_tmp" - - $verbose && echo "$progname: Updating $db_file... " - $dry_run && continue - - echo "$ls_R_magic" >"$db_file_tmp" - - # The main task. We put ./: in the output, so top-level files can be - # found via ls-R. Probably irrelevant in practice. The sed command - # inserts the leading ./ for directory names, and removes ., .., and - # version control entries from the list. Also omit contents of any - # the version directories; sed apparently requires that we do that - # operation in a separate invocation. We do not try to support colons - # in directory names. - # - echo "./:" >>"$db_file_tmp" - vc_dirs='\.\(bzr\|git\|hg\|svn\)\|_darcs' - (cd "$TEXMFLS_R" && \ls -LRa 2>/dev/null) \ - | sed -e '/^$/{n;s%^\./%%;s%^%./%;}; /^\.$/d; /^\.\.$/d; /^'$vc_dirs'$/d;' \ - -e '/^[\.\/]*lsR[0-9]*\.tmp:*$/d' \ - | sed -e /$vc_dirs'.*:$/,/^$/d' \ - >>"$db_file_tmp" - - # To be really safe, a loop. - until PERMS=`kpsestat = "$db_file"`; do sleep 1; done - chmod $PERMS "$db_file_tmp" - rm -f "$db_file" - mv "$db_file_tmp" "$db_file" - rm -rf "$db_dir_tmp" -done - -$verbose && echo "$progname: Done." -exit 0 +../../texmf-dist/scripts/texlive/mktexlsr
\ No newline at end of file diff --git a/Master/bin/amd64-netbsd/mktexmf b/Master/bin/amd64-netbsd/mktexmf index bb868c12a8d..302c00f763e 100755..120000 --- a/Master/bin/amd64-netbsd/mktexmf +++ b/Master/bin/amd64-netbsd/mktexmf @@ -1,151 +1 @@ -#!/bin/sh -# original mktexmf -- make a new MF file, because one wasn't found. -# -# (If you change or delete the word `original' on the previous line, -# installation won't write this script over yours.) -# -# Originally written by Thomas Esser. -# Public domain. - -version='$Id: mktexmf 34656 2014-07-18 23:38:50Z karl $' - -# preferentially use subprograms from our own directory. -mydir=`echo "$0" | sed 's,/[^/]*$,,'` -mydir=`cd "$mydir" && pwd` -PATH="$mydir:$PATH"; export PATH - -usage="Usage: $0 FONT. - -Makes the Metafont source file for FONT, if possible. For example, -\`ecr12' or \`cmr11'. - -Report bugs to: tex-k@tug.org -TeX Live home page: <http://tug.org/texlive/> -" - -# Common code for all scripts. -: ${MT_TEXMFMAIN=`kpsewhich --expand-path='$TEXMFMAIN'`} -: ${MT_MKTEX_OPT=`kpsewhich --format='web2c files' mktex.opt`} -test -n "$MT_MKTEX_OPT" || MT_MKTEX_OPT="$MT_TEXMFMAIN/web2c/mktex.opt" -if test ! -f "$MT_MKTEX_OPT"; then - echo "$progname: Cannot find mktex.opt; check your installation." >&2 - exit 1 -fi - -. "$MT_MKTEX_OPT" - -( -# See comments in mktexpk. -name="`echo $1 | sed 's%.*/%%; s%\.mf$%%'`" -rootname=`echo "$name" | sed 's/[0-9]*$//'` -pointsize=`echo "$name" | sed "s/^$rootname//"` - -sauterroot=`kpsewhich b-$rootname.mf 2>/dev/null` -if test -n "$sauterroot"; then - rootfile=$sauterroot - rootname=b-$rootname -else - case $name in - # csso12[0-5][0-9] from CJK package; unsupported by mktexmf - csso12[0-5][0-9]) - rootfile=;; - *) - case $rootname in - cs*|lcsss*|icscsc*|icstt*|ilcsss*) - rootfile=`kpsewhich cscode.mf`;; - wn[bcdfirstuv]*|rx[bcdfiorstuvx][bcfhilmostx]|l[abcdhl][bcdfiorstuvx]*) - lhprefix=`echo "$name" | sed 's/^\(..\).*/\1/'` - rootfile=`kpsewhich ${lhprefix}codes.mf 2>/dev/null`;; - *) - rootfile=`kpsewhich $rootname.mf 2>/dev/null`;; - esac;; - esac -fi -{ test -z "$rootfile" || test ! -f "$rootfile"; } && exit 1 - -#if test -z "$MT_MFNAME"; then -OIFS=$IFS; IFS=$SEP -set x `"$MT_MKTEXNAM" $name`; shift -IFS=$OIFS -MT_MFNAME="$3" -#fi - -destdir=`echo "$MT_MFNAME" | sed 's%/[^/][^/]*$%%'` -test -d "$destdir" || "$MT_MKTEXDIR" "$destdir" || exit 1 -cd "$destdir" || exit 1 - -case "$pointsize" in - "") echo "$progname: no pointsize."; exit 1;; - 11) realsize=10.95;; # \magstephalf - 14) realsize=14.4;; # \magstep2 - 17) realsize=17.28;; # \magstep3 - 20) realsize=20.74;; # \magstep4 - 25) realsize=24.88;; # \magstep5 - 30) realsize=29.86;; # \magstep6 - 36) realsize=35.83;; # \magstep7 - # The new convention is to have three or four letters for the - # font name and four digits for the pointsize. The number is - # pointsize * 100. We effectively divide by 100 by ignoring the - # last two digits. - ????|?????) realsize=`echo "$pointsize" | sed 's/\(..\)$/.\1/'`;; - *) realsize="$pointsize";; -esac - -mfname="$name.mf" -if test -r "$mfname"; then - echo "$progname: $destdir/$mfname already exists." - echo "$destdir/$mfname" >$STDOUT - "$MT_MKTEXUPD" "$destdir" "$mfname" - exit 0 -fi - -case "$name" in - ec*|tc*) - cat > "mf$$.tmp" <<END -if unknown exbase: input exbase fi; -gensize:=$realsize; -generate $rootname; -END - ;; - dc*) - cat > "mf$$.tmp" <<END -if unknown dxbase: input dxbase fi; -gensize:=$realsize; -generate $rootname; -END - ;; - cs*|lcsss*|icscsc*|icstt*|ilcsss*) - cat > "mf$$.tmp" <<END -input cscode -use_driver; -END - ;; - wn[bcdfirstuv]*|rx[bcdfiorstuvx][bcfhilmostx]*|l[abcdhl][bcdfiorstuvx]*) - cat > "mf$$.tmp" <<END -input fikparm; -END - ;; - g[lmorst][bijmtwx][cilnoru]*) - # A small superset of the names of the cbgreek fonts. - cat > "mf$$.tmp" <<END -% generated by mktexmf -input cbgreek; -END - ;; - *) - cat > "mf$$.tmp" <<END -design_size := $realsize; -input $rootname; -END - ;; -esac - -chmod `kpsestat -xst,go-w .` "mf$$.tmp" -rm -f "$mfname" -mv "mf$$.tmp" "$mfname" - -echo "$destdir/$mfname" >$STDOUT -echo "$progname: $destdir/$mfname: successfully generated." >&2 -"$MT_MKTEXUPD" "$destdir" "$mfname" -exit 0 -) 1>&2 </dev/null +../../texmf-dist/scripts/texlive/mktexmf
\ No newline at end of file diff --git a/Master/bin/amd64-netbsd/mktexpk b/Master/bin/amd64-netbsd/mktexpk index 2672dc7f78c..a0d6db0121b 100755..120000 --- a/Master/bin/amd64-netbsd/mktexpk +++ b/Master/bin/amd64-netbsd/mktexpk @@ -1,284 +1 @@ -#!/bin/sh -# original mktexpk -- make a new PK font, because one wasn't found. -# -# (If you change or delete the word `original' on the previous line, -# installation won't write this script over yours.) -# -# Originally written by Thomas Esser, Karl Berry, and Olaf Weber. -# Public domain. - -version='$Id: mktexpk 34656 2014-07-18 23:38:50Z karl $' -progname=`echo $0 | sed 's%.*/%%'` - -# preferentially use subprograms from our own directory. -mydir=`echo "$0" | sed 's,/[^/]*$,,'` -mydir=`cd "$mydir" && pwd` -PATH="$mydir:$PATH"; export PATH - -usage="Usage: $progname [OPTIONS] NAME [REDIRECT], - Create a PK font. - ---dpi DPI use resolution DPI. ---bdpi BDPI use base resolution BDPI. ---mag MAG use magnificiation MAG. ---mfmode MODE use MODE as the METAFONT mode. ---destdir DESTDIR write fonts in DESTDIR. - -Try to create a bitmap PK file for NAME at resolution DPI, with an -assumed device base resolution of BDPI, and a Metafont \`mag' of -MAG. Use MODE for the METAFONT mode. Use DESTDIR for the root of where -to install into, either the absolute directory name to use (if it starts -with a /) or relative to the default DESTDIR (if not). REDIRECT, if -supplied, is a string of the form '>&n', where n is the number of the -file descriptor which is to receive, instead of stdout, the name of the -newly created pk file. - -If you expected the font to be available as an outline, and thus this -script does not work and should not have been called, most likely the -font's .tfm name is missing from the relevant map file (e.g., -psfonts.map for dvips, pdftex.map for pdftex). These map files are -typically maintained using updmap; q.v. - -For step-by-step instructions on making new fonts known to TeX, see -http://tug.org/fonts/fontinstall.html. - -Report bugs to: tex-k@tug.org -TeX Live home page: <http://tug.org/texlive/> -" - -# Handle non-positional options, except for --version/--help -while test $# -gt 0; do - case "$1" in - --destdir) shift; DEST="$1"; shift ;; - --destdir=*) DEST=`echo "$1" | sed 's/--destdir=//'`; shift ;; - --dpi) shift; DPI="$1"; shift ;; - --dpi=*) DPI=`echo "$1" | sed 's/--dpi=//'`; shift ;; - --bdpi) shift; BDPI="$1"; shift ;; - --bdpi=*) BDPI=`echo "$1" | sed 's/--bdpi=//'`; shift ;; - --mfmode) shift; test "x$1" != "x/" && MODE="$1"; shift ;; - --mfmode=*) test "x$1" != "x--mfmode/" \ - && MODE=`echo "$1" | sed 's/--mfmode=//'`; shift ;; - --mag) shift; MAG="$1"; shift;; - --mag=*) MAG=`echo "$1" | sed '/s--mag=//'`; shift;; - --version|-version) break ;; - --help|-help) break ;; - *) break ;; - esac -done - -if test "x$2" != x; then - tail="`echo \"x$2\" | sed 's/^x>&//' | grep '^[0-9]*$'`" - if test -z "$tail"; then - echo "$progname: argument '$2' ignored - bad file number" >&2 - elif test "$tail" != 1; then - eval 'exec 1>&$tail' - fi -fi - -mt_max_args=2 - -# Common code for all scripts. -: ${MT_TEXMFMAIN=`kpsewhich --expand-path='$TEXMFMAIN'`} -: ${MT_MKTEX_OPT=`kpsewhich --format='web2c files' mktex.opt`} -test -n "$MT_MKTEX_OPT" || MT_MKTEX_OPT="$MT_TEXMFMAIN/web2c/mktex.opt" -if test ! -f "$MT_MKTEX_OPT"; then - echo "$progname: Cannot find mktex.opt; check your installation." >&2 - exit 1 -fi - -. "$MT_MKTEX_OPT" - -# Where do potential driver files belong? -case "$MT_FEATURES" in - *nomfdrivers*) - : ${MT_MFDESTDIR=`pwd`} - export MT_MFDESTDIR;; -esac - -# Since we want to pass the generated filename and only that filename -# back to the caller on standard output, we do some redirections so -# regular echo's will end up on stderr, and do an echo >$STDOUT at the end. -# Then the contents of $STDOUT will be echoed to stdout by a trap. - -# start of redirection stdout -> stderr, stdin <- /dev/null -( - -NAME=$1 - -if kpsewhich $NAME.mf >/dev/null 2>&1 || mktexmf $NAME >/dev/null 2>&1; then - # determine the progname of metafont to use; prefer mf-nowin. - if (mf-nowin --version) >/dev/null 2>&1; then - MF="mf-nowin -progname=mf" - else - MF=mf - fi - - # Check that $BDPI and $MODE are consistent; if not, ignore the mode and - # hope we can correctly guess it from bdpi. (People like to specify the - # resolution on the command line, not the mode so much.) - if test -n "$MODE"; then - mf_bdpi=`$MF \ -'\mode:='$MODE';mode_setup;message"BDPI= "&decimal round pixels_per_inch;end.'\ - </dev/null \ - | awk '/DPI=/ {print $2}'` - if test "x$mf_bdpi" != x$BDPI; then - echo "$progname: Mismatched mode $MODE and resolution $BDPI; ignoring mode." >&2 - MODE= - fi - fi - - # If an explicit mode is not supplied, try to guess. You can get a - # list of extant modes from ftp://ftp.tug.org/tex/modes.mf. - if test -z "$MODE" || test "x$MODE" = xdefault; then - case "$BDPI" in - 85) MODE=sun;; - 100) MODE=nextscrn;; - 180) MODE=toshiba;; - 300) MODE=cx;; - 360) MODE=epstylus;; - 400) MODE=nexthi;; - 600) MODE=ljfour;; - 720) MODE=epscszz;; - 1200) MODE=ultre;; - 1270) MODE=linoone;; - 8000) MODE=dpdfezzz;; - *) echo "$progname: Can't guess mode for $BDPI dpi devices." >&2 - echo "$progname: Use a config file or option to specify the mode; see:" >&2 - echo "$progname: http://tug.org/texinfohtml/kpathsea.html#Unable-to-generate-fonts" >&2 - exit 1 - esac - fi - - # Run Metafont. Always use plain Metafont, since reading cmbase.mf - # does not noticeably slow things down. - cmd="$MF \mode:=$MODE; mag:=$MAG; nonstopmode; input $NAME" -else - MODE=modeless - # ps_to_pk is set in mktex.opt - case $ps_to_pk in - gsftopk) - if $ps_to_pk -t "$NAME"; then - cmd="$ps_to_pk $NAME $DPI" - fi;; - ps2pk) - # grep for the font in $PSMAPFILE. These are base font names, such as - # rpplr (the original) or pplr0 (an interim step) or pplr8r (current). - : ${PSMAPFILE=`kpsewhich --format=map psfonts.map ps2pk.map`} - pattern="^$NAME"'([ ]|$)' - psline=`egrep "$pattern" $PSMAPFILE | tail -1` - if test -n "$psline"; then - set x `echo "$psline" | sed 's%[<["]%%g'` - shift; shift; shift; - encoding=; psname=; slant=; extend= - while test ! -z "$1"; do - case "$1" in - *.enc) encoding="-e $1";; - *.pf[ab]) psname="$1";; - *SlantFont) slant="-S $lastopt";; - *ExtendFont) extend="-E $lastopt";; - esac - lastopt="$1" - shift - done - # Guessing the name of the type1 font file as fallback: - ANAME=`echo $NAME | sed 's/8r$/8a/'` - for i in $NAME.pfa $NAME.pfb $ANAME.pfa $ANAME.pfb; do - if kpsewhich $i >/dev/null 2>&1; then - psname=$i - break - fi - done - - if [ -n "$psname" ]; then - cmd="ps2pk -v -X$DPI -R$BDPI $slant $extend $encoding $psname $NAME.${DPI}pk" - else - if gsftopk -t "$NAME"; then - echo "$progname: cannot find $NAME.pfa or $NAME.pfb. Trying gsftopk." >&2 - cmd="gsftopk $NAME $DPI" - fi - fi - fi;; - esac - - # unsupported by $ps_to_pk, try other conversions: - if test -z "$cmd"; then - if (ttf2pk -t -q $NAME) >/dev/null 2>&1; then - cmd="ttf2pk -q $NAME $DPI" - elif (hbf2gf -t -q $NAME) >/dev/null 2>&1; then - cmd="hbf2gf -q -p $NAME $DPI" - else - echo "$progname: don't know how to create bitmap font for $NAME." >&2 - echo "$progname: perhaps $NAME is missing from the map file." >&2 - exit 1 - fi - fi -fi - -OIFS=$IFS; IFS=$SEP -set x `"$MT_MKTEXNAM" $NAME $DPI $MODE $DEST`; shift -IFS=$OIFS - -PKDEST="$1" -PKDESTDIR=`echo "$PKDEST" | sed 's%/[^/][^/]*$%%'` # can't rely on dirname -PKNAME=`basename "$PKDEST"` -GFNAME=$NAME.${DPI}gf - -if test -r "$PKDESTDIR/$PKNAME"; then - echo "$progname: $PKDESTDIR/$PKNAME already exists." >&2 - echo "$PKDESTDIR/$PKNAME" >$STDOUT - "$MT_MKTEXUPD" "$PKDESTDIR" $PKNAME - exit 0 -fi - -"$MT_MKTEXDIR" "$PKDESTDIR" -if test ! -d "$PKDESTDIR"; then - echo "$progname: $MT_MKTEXDIR $PKDESTDIR failed." >&2 - exit 1 -fi - -echo "$progname: Running $cmd" -$cmd </dev/null || { - # Don't abort if only "Strange path", "bad pos" or "angle(0,0)" - # errors occurr. - grep '^!' $NAME.log | sort >$$.errs 2>/dev/null - grep '^! Strange path' $$.errs >$$.strange 2>/dev/null - grep '^! bad pos.' $$.errs >$$.badpos 2>/dev/null - grep '^! angle(0,0) is taken as zero.' $$.errs >$$.angle 2>/dev/null - cat $$.badpos $$.strange $$.angle | sort > $$.errs_accept - if cmp $$.errs $$.errs_accept >/dev/null 2>&1; then - test -s $$.strange >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused strange path errors." >&2 - test -s $$.badpos >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused bad pos errors." >&2 - test -s $$.angle >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused angle(0,0) errors." >&2 - else - echo "$progname: \`$cmd' failed." >&2 - test -s $NAME.log && mv -f $NAME.log "$KPSE_DOT" - exit 1; - fi -} - -test -r $GFNAME && { gftopk ./$GFNAME $PKNAME || exit 1; } -test ! -f $PKNAME && test -f $NAME.${DPI}pk && mv $NAME.${DPI}pk $PKNAME -if test ! -s $PKNAME; then - echo "$progname: \`$cmd' failed to make $PKNAME." >&2 - exit 1 -fi - -# Install the PK file carefully, since others may be working simultaneously. -# Use cp when mv fails, since DOS will fail mv for deeply-nested directories. -mv $PKNAME "$PKDESTDIR/pk$$.tmp" 2>/dev/null \ - || cp $PKNAME "$PKDESTDIR/pk$$.tmp" || exit 1 -cd "$PKDESTDIR" || exit 1 -chmod `kpsestat -xst,go-w .` pk$$.tmp -test -r $PKNAME || mv pk$$.tmp $PKNAME || exit 1 - -# Update ls-R if necessary. -"$MT_MKTEXUPD" "$PKDESTDIR" $PKNAME - -# If this line (or an equivalent) is not present, dvipsk/xdvik/dviljk -# will think mktexpk failed. Any other output to stdout will also lose. -echo "$PKDESTDIR/$PKNAME" >$STDOUT -echo "$progname: $PKDESTDIR/$PKNAME: successfully generated." >&2 -) 1>&2 </dev/null +../../texmf-dist/scripts/texlive/mktexpk
\ No newline at end of file diff --git a/Master/bin/amd64-netbsd/mktextfm b/Master/bin/amd64-netbsd/mktextfm index 46e30a9c5dc..70ae3a438ce 100755..120000 --- a/Master/bin/amd64-netbsd/mktextfm +++ b/Master/bin/amd64-netbsd/mktextfm @@ -1,162 +1 @@ -#!/bin/sh -# original mktextfm -- make a new TFM file, because one wasn't found. -# -# (If you change or delete the word `original' on the previous line, -# installation won't write this script over yours.) -# -# Primarily written by Thomas Esser, Karl Berry, and Olaf Weber. -# Public domain. - -version='$Id: mktextfm 34656 2014-07-18 23:38:50Z karl $' -progname=`echo $0 | sed 's%.*/%%'` - -# preferentially use subprograms from our own directory. -mydir=`echo "$0" | sed 's,/[^/]*$,,'` -mydir=`cd "$mydir" && pwd` -PATH="$mydir:$PATH"; export PATH - -usage="Usage: $progname [--destdir DESTDIR] FONT. - -Makes a TFM file for FONT, if possible. Use DESTDIR for the root of where -to install into, either the absolute directory name to use (if it starts -with a /) or relative to the default DESTDIR (if not). - -Report bugs to: tex-k@tug.org -TeX Live home page: <http://tug.org/texlive/> -" - -# Handle non-positional options, except for --version/--help -while test $# -gt 0; do - case "$1" in - --destdir) shift; DEST="$1"; shift ;; - --destdir=*) DEST=`echo "$1" | sed 's/--destdir=//'`; shift ;; - --version|-version) break ;; - --help|-help) break ;; - *) break ;; - esac -done - -# Common code for all scripts. -: ${MT_TEXMFMAIN=`kpsewhich --expand-path='$TEXMFMAIN'`} -: ${MT_MKTEX_OPT=`kpsewhich --format='web2c files' mktex.opt`} -test -n "$MT_MKTEX_OPT" || MT_MKTEX_OPT="$MT_TEXMFMAIN/web2c/mktex.opt" -if test ! -f "$MT_MKTEX_OPT"; then - echo "$progname: Cannot find mktex.opt; check your installation." >&2 - exit 1 -fi - -. "$MT_MKTEX_OPT" - -# Where do potential mf driver files go? -case "$MT_FEATURES" in - *nomfdrivers*) - : ${MT_MFDESTDIR=`pwd`} - export MT_MFDESTDIR;; -esac - -# start of redirection stdout -> stderr, stdin <- /dev/null -( - -NAME=`basename "$1" .tfm` -MAG=1 # mag=0 fails with larm1000.mf -#DEST="$2" -DPI=$BDPI - -OIFS=$IFS; IFS=$SEP -set x `"$MT_MKTEXNAM" $NAME $DPI $MODE $DEST`; shift -IFS=$OIFS - -PKDEST="$1" -TFMDEST="$2" -PKDESTDIR=`echo "$PKDEST" | sed 's%/[^/][^/]*$%%'` # can't rely on dirname -TFMDESTDIR=`echo "$TFMDEST" | sed 's%/[^/][^/]*$%%'` -PKNAME=`basename "$PKDEST"` -TFMNAME=$NAME.tfm -GFNAME=$NAME.$DPI'gf' - -if test -r "$TFMDESTDIR/$TFMNAME"; then - echo "$progname: $TFMDESTDIR/$TFMNAME already exists." >&2 - echo "$TFMDESTDIR/$TFMNAME" >$STDOUT - "$MT_MKTEXUPD" "$TFMDESTDIR" $TFMNAME - exit -fi - -# Try to create the destdir first. Do not create fonts, if this fails. -"$MT_MKTEXDIR" "$TFMDESTDIR" -if test ! -d "$TFMDESTDIR"; then - echo "$progname: mktexdir $TFMDESTDIR failed." - exit 1 -fi - -# Check if this font is supported by hbf2gf else use metafont. -if (hbf2gf -q -t $NAME) >/dev/null 2>&1; then - cmd="hbf2gf -g $NAME $DPI" -else - # determine the progname of metafont to use; prefer mf-nowin. - if (mf-nowin --version) >/dev/null 2>&1; then - MF="mf-nowin -progname=mf" - else - MF=mf - fi - - cmd="$MF \mode:=$MODE; mag:=$MAG; nonstopmode; input $NAME" -fi - -echo "$progname: Running $cmd" -$cmd </dev/null || { - # Don't abort if only "Strange path", "bad pos" or "angle(0,0)" - # errors occurr. - grep '^!' $NAME.log | sort >$$.errs 2>/dev/null - grep '^! Strange path' $$.errs >$$.strange 2>/dev/null - grep '^! bad pos.' $$.errs >$$.badpos 2>/dev/null - grep '^! angle(0,0) is taken as zero.' $$.errs >$$.angle 2>/dev/null - cat $$.badpos $$.strange $$.angle | sort > $$.errs_accept - if cmp $$.errs $$.errs_accept >/dev/null 2>&1; then - test -s $$.strange >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused strange path errors." >&2 - test -s $$.badpos >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused bad pos errors." >&2 - test -s $$.angle >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused angle(0,0) errors." >&2 - else - echo "$progname: \`$cmd' failed." >&2 - test -s $NAME.log && mv -f $NAME.log "$KPSE_DOT" - exit 1; - fi -} - -# hbf2gf just produces a .pl file: -test -r ./$NAME.pl && pltotf ./$NAME.pl $TFMNAME -test -r $TFMNAME || { echo "$progname: \`$cmd' failed to make $TFMNAME."; exit 1; } - -# Install the TFM file carefully, since others may be working simultaneously. -# Use cp when mv fails, since DOS will fail mv for deeply-nested directories. -mv $TFMNAME "$TFMDESTDIR/tfm$$.tmp" 2>/dev/null \ - || cp $TFMNAME "$TFMDESTDIR/tfm$$.tmp" || exit 1 -cd "$TFMDESTDIR" || exit 1 -chmod `kpsestat -xst,go-w .` tfm$$.tmp -test -r $TFMNAME || mv tfm$$.tmp $TFMNAME || exit 1 - -# OK, success with the TFM. -"$MT_MKTEXUPD" "$TFMDESTDIR" $TFMNAME -echo "$TFMDESTDIR/$TFMNAME" >$STDOUT -echo "$progname: $TFMDESTDIR/$TFMNAME: successfully generated." >&2 - -# Since we probably made a GF(->PK) file, too, may as well install it if -# it's needed. -cd $TEMPDIR -if test -r $GFNAME && test ! -f "$PKDESTDIR/$PKNAME"; then - gftopk ./$GFNAME $PKNAME || exit 1 - "$MT_MKTEXDIR" "$PKDESTDIR" - mv $PKNAME "$PKDESTDIR/pk$$.tmp" 2>/dev/null \ - || cp $PKNAME "$PKDESTDIR/pk$$.tmp" || exit 1 - cd "$PKDESTDIR" || exit 1 - if test -f $PKNAME; then - rm -f pk$$.tmp - else - chmod `kpsestat -xst,go-w .` pk$$.tmp - mv pk$$.tmp $PKNAME - "$MT_MKTEXUPD" "$PKDESTDIR" $PKNAME - fi -fi -) 1>&2 </dev/null +../../texmf-dist/scripts/texlive/mktextfm
\ No newline at end of file diff --git a/Master/bin/armhf-linux/mktexlsr b/Master/bin/armhf-linux/mktexlsr index 5fde39e2c2d..a36378a2b9f 100755..120000 --- a/Master/bin/armhf-linux/mktexlsr +++ b/Master/bin/armhf-linux/mktexlsr @@ -1,236 +1 @@ -#!/bin/sh -# original mktexlsr -- create or rebuild ls-R. -# -# (If you change or delete the word `original' on the previous line, -# installation won't write this script over yours.) -# -# Suitable for calling from cron, as in: -# 0 * * * * cd /your/texmf/root && /usr/local/texlive/bin/mktexlsr -# -# Originally written as `texhash' by Thomas Esser, Okt., 1994. -# Public domain. - -version='$Id: mktexlsr 46343 2018-01-17 00:55:32Z preining $' -progname=`echo $0 | sed 's%.*/%%'` - -usage="Usage: $progname [OPTION]... [DIR]... - -Rebuild ls-R filename databases used by TeX. If one or more arguments -DIRS are given, these are used as the directories in which to build -ls-R. Else all directories in the search path for ls-R files -(\$TEXMFDBS) are used. - -Options: - --dry-run do not actually update anything - --help display this help and exit - --quiet cancel --verbose - --silent same as --quiet - --verbose explain what is being done - --version output version information and exit - -If standard input is a terminal, --verbose is on by default. - -For more information, see the \`Filename database' section of -Kpathsea manual available at http://tug.org/kpathsea. - -Report bugs to: tex-k@tug.org -TeX Live home page: <http://tug.org/texlive/> -" - -# The simple PATH-prepending approach we take in other scripts doesn't -# handle DOS/Windows, but we don't use the shell scripts on Windows -# anyway, and does anyone want current TL on DOS or DJGPP? Maybe they -# can maintain their own changes if so. Leaving this code though, since -# it's always been here ... - -# MS-DOS and MS-Windows define $COMSPEC or $ComSpec and use `;' to separate -# directories in path lists whereas Unix uses `:'. Make an exception for -# Cygwin, which pretends to be UNIX. -# Create a variable that holds the right character to be used by the scripts. -DOSISH=no -case `uname -s` in - CYGWIN*|Cygwin*|cygwin*) ;; - *) if test -n "$COMSPEC" || test -n "$ComSpec"; then DOSISH=yes; fi -esac -if test "$DOSISH" = "no"; then SEP=':'; else SEP=';';fi - -# Add the location of the script to the PATH if necessary. This must -# be done before kpsewhich can be called, and thus cannot be put into -# mktex.opt. -dirname=`echo $0 | sed 's%/*[^/][^/]*$%%'` -case $dirname in - "") # Do nothing - ;; - /* | [A-z]:/*) # Absolute name - PATH="$dirname$SEP$PATH" - export PATH ;; - *) # Relative name - PATH="`pwd`/$dirname$SEP$PATH" - export PATH ;; -esac - -if tty -s; then verbose=true; else verbose=false; fi -dry_run=false -trees= - -# initialize treefile by either mktemp or some random name -# code taken from pdfjam and adjusted -{ - treefile=` - (umask 077 && mktemp "${TMPDIR-/tmp}/mktexlsrtrees.XXXXXXXXXX") 2>/dev/null - ` && test -n "$treefile" && test -f "$treefile" -} || { - ## We'll use awk to make random number, for portability - random=`awk 'END { srand(); printf ("%d\n", rand()*1000000); }' /dev/null` - treefile="${TMPDIR-/tmp}/mktexlsrtrees$$.$random" -} || exit $? - -trap 'cd /; rm -f $treefile; test -z "$db_dir_tmp" || rm -rf "$db_dir_tmp"; - exit' 0 1 2 3 7 13 15 - -# A copy of some stuff from mktex.opt, so we can run in the presence of -# terminally damaged ls-R files. -while test $# -gt 0; do - if test "x$1" = x--help || test "x$1" = x-help; then - echo "$usage" - exit 0 - elif test "x$1" = x--version || test "x$1" = x-version; then - echo "`basename $0` $version" - kpsewhich --version - exit 0 - elif test "x$1" = x--verbose || test "x$1" = x-verbose; then - verbose=true - elif test "x$1" = x--dry-run || test "x$1" = x-n; then - dry_run=true - elif test "x$1" = x--quiet || test "x$1" = x--silent \ - || test "x$1" = x-quiet || test "x$1" = x-silent ; then - verbose=false - elif test "x$1" = x--; then - : - elif echo "x$1" | grep '^x-' >/dev/null; then - echo "$progname: unknown option \`$1', try --help if you need it." >&2 - exit 1 - else - if test ! -d "$1"; then - echo "$progname: $1: not a directory, skipping." >&2 - shift - continue - fi - # By saving the argument in a file, we can later get it back while - # supporting spaces in the name. This still doesn't support - # newlines in the directory names, but nobody ever complains about - # that, and it seems much too much trouble to use \0 terminators. - (umask 077 - if echo "$1" >>"$treefile"; then :; else - echo "$progname: $treefile: could not append to arg file, goodbye." >&2 - exit 1 - fi - ) - fi - shift -done - -# mktexupd and mktexlsr make sure they're coordinated via this. A copy -# is found mktex.opt. -ls_R_magic='% ls-R -- filename database for kpathsea; do not change this line.' -# The old string, which should continue to work. -old_ls_R_magic='% ls-R -- maintained by MakeTeXls-R; do not change this line.' - -{ - # Get list of directories from the explicit arguments (now saved in - # $treefile), or $TEXMFDBS if no explicit args. Eliminate duplicates. - saveIFS=$IFS # break only at newline - IFS=' -' - if test -s "$treefile"; then - set x `sort "$treefile" | uniq` - else - set x `kpsewhich --show-path=ls-R | tr : ' -' | sort | uniq` - fi - IFS=$saveIFS - shift -} - -for TEXMFLS_R in "$@"; do - # Prepend cwd if the directory was relative. - case "$TEXMFLS_R" in - "") continue ;; # Strictly speaking, it is an error if this case is taken. - /* | [A-z]:/*) ;; - *) TEXMFLS_R="`pwd`/$TEXMFLS_R" - esac - # Allow for either ls-R and ls-r to exist. But create ls-R if we're - # working from scratch. - if test -f "$TEXMFLS_R/ls-R"; then - db_file="$TEXMFLS_R/ls-R" - elif test -f "$TEXMFLS_R/ls-r"; then - db_file="$TEXMFLS_R/ls-r" - else - db_file="$TEXMFLS_R/ls-R" - fi - # Follow a possible symlink to get the right filesystem. - # The '|| true' construct prevents an sh -e aborting. - db_readlink=`kpsereadlink "$TEXMFLS_R/ls-R" 2>/dev/null` || true - case "$db_readlink" in - "") ;; - /* | [A-z]:/*) db_file="$db_readlink" ;; - *) db_file="$TEXMFLS_R/$db_readlink" - esac - db_dir=`echo "$db_file" | sed 's%/[^/][^/]*$%%'` # can't rely on dirname - - # want to be silent if the directory doesn't exist, since the ls-R - # path ordinarily contains many nonexistent directories. - test -d "$db_dir" || continue - test -w "$db_dir" || { echo "$progname: $db_dir: directory not writable. Skipping..." >&2; continue; } - - if test ! -f "$db_file"; then - cp /dev/null "$db_file" - # Use same permissions as parent directory, minus x,s, or t bits. - chmod `kpsestat -xst "$db_dir"` "$db_file" - elif test -s "$db_file" \ - && test "x`sed '1s/
$//;1q' \"$db_file\"`" != "x$ls_R_magic" \ - && test "x`sed '1s/
$//;1q' \"$db_file\"`" != "x$old_ls_R_magic"; then - echo "$progname: $db_file: no magic string, skipping..." >&2 - continue - fi - - # Skip if we cannot write the file: - kpseaccess -w "$db_file" || { echo "$progname: $db_file: no write permission, skipping..." >&2; continue; } - - db_dir_tmp="$db_dir/lsR$$.tmp" - (umask 077 && mkdir "$db_dir_tmp" ) \ - || { echo "$progname: $db_dir_tmp: could not create directory, skipping..." >&2; continue; } - db_file_tmp="$db_dir_tmp/lsR$$.tmp" - rm -f "$db_file_tmp" - - $verbose && echo "$progname: Updating $db_file... " - $dry_run && continue - - echo "$ls_R_magic" >"$db_file_tmp" - - # The main task. We put ./: in the output, so top-level files can be - # found via ls-R. Probably irrelevant in practice. The sed command - # inserts the leading ./ for directory names, and removes ., .., and - # version control entries from the list. Also omit contents of any - # the version directories; sed apparently requires that we do that - # operation in a separate invocation. We do not try to support colons - # in directory names. - # - echo "./:" >>"$db_file_tmp" - vc_dirs='\.\(bzr\|git\|hg\|svn\)\|_darcs' - (cd "$TEXMFLS_R" && \ls -LRa 2>/dev/null) \ - | sed -e '/^$/{n;s%^\./%%;s%^%./%;}; /^\.$/d; /^\.\.$/d; /^'$vc_dirs'$/d;' \ - -e '/^[\.\/]*lsR[0-9]*\.tmp:*$/d' \ - | sed -e /$vc_dirs'.*:$/,/^$/d' \ - >>"$db_file_tmp" - - # To be really safe, a loop. - until PERMS=`kpsestat = "$db_file"`; do sleep 1; done - chmod $PERMS "$db_file_tmp" - rm -f "$db_file" - mv "$db_file_tmp" "$db_file" - rm -rf "$db_dir_tmp" -done - -$verbose && echo "$progname: Done." -exit 0 +../../texmf-dist/scripts/texlive/mktexlsr
\ No newline at end of file diff --git a/Master/bin/armhf-linux/mktexmf b/Master/bin/armhf-linux/mktexmf index bb868c12a8d..302c00f763e 100755..120000 --- a/Master/bin/armhf-linux/mktexmf +++ b/Master/bin/armhf-linux/mktexmf @@ -1,151 +1 @@ -#!/bin/sh -# original mktexmf -- make a new MF file, because one wasn't found. -# -# (If you change or delete the word `original' on the previous line, -# installation won't write this script over yours.) -# -# Originally written by Thomas Esser. -# Public domain. - -version='$Id: mktexmf 34656 2014-07-18 23:38:50Z karl $' - -# preferentially use subprograms from our own directory. -mydir=`echo "$0" | sed 's,/[^/]*$,,'` -mydir=`cd "$mydir" && pwd` -PATH="$mydir:$PATH"; export PATH - -usage="Usage: $0 FONT. - -Makes the Metafont source file for FONT, if possible. For example, -\`ecr12' or \`cmr11'. - -Report bugs to: tex-k@tug.org -TeX Live home page: <http://tug.org/texlive/> -" - -# Common code for all scripts. -: ${MT_TEXMFMAIN=`kpsewhich --expand-path='$TEXMFMAIN'`} -: ${MT_MKTEX_OPT=`kpsewhich --format='web2c files' mktex.opt`} -test -n "$MT_MKTEX_OPT" || MT_MKTEX_OPT="$MT_TEXMFMAIN/web2c/mktex.opt" -if test ! -f "$MT_MKTEX_OPT"; then - echo "$progname: Cannot find mktex.opt; check your installation." >&2 - exit 1 -fi - -. "$MT_MKTEX_OPT" - -( -# See comments in mktexpk. -name="`echo $1 | sed 's%.*/%%; s%\.mf$%%'`" -rootname=`echo "$name" | sed 's/[0-9]*$//'` -pointsize=`echo "$name" | sed "s/^$rootname//"` - -sauterroot=`kpsewhich b-$rootname.mf 2>/dev/null` -if test -n "$sauterroot"; then - rootfile=$sauterroot - rootname=b-$rootname -else - case $name in - # csso12[0-5][0-9] from CJK package; unsupported by mktexmf - csso12[0-5][0-9]) - rootfile=;; - *) - case $rootname in - cs*|lcsss*|icscsc*|icstt*|ilcsss*) - rootfile=`kpsewhich cscode.mf`;; - wn[bcdfirstuv]*|rx[bcdfiorstuvx][bcfhilmostx]|l[abcdhl][bcdfiorstuvx]*) - lhprefix=`echo "$name" | sed 's/^\(..\).*/\1/'` - rootfile=`kpsewhich ${lhprefix}codes.mf 2>/dev/null`;; - *) - rootfile=`kpsewhich $rootname.mf 2>/dev/null`;; - esac;; - esac -fi -{ test -z "$rootfile" || test ! -f "$rootfile"; } && exit 1 - -#if test -z "$MT_MFNAME"; then -OIFS=$IFS; IFS=$SEP -set x `"$MT_MKTEXNAM" $name`; shift -IFS=$OIFS -MT_MFNAME="$3" -#fi - -destdir=`echo "$MT_MFNAME" | sed 's%/[^/][^/]*$%%'` -test -d "$destdir" || "$MT_MKTEXDIR" "$destdir" || exit 1 -cd "$destdir" || exit 1 - -case "$pointsize" in - "") echo "$progname: no pointsize."; exit 1;; - 11) realsize=10.95;; # \magstephalf - 14) realsize=14.4;; # \magstep2 - 17) realsize=17.28;; # \magstep3 - 20) realsize=20.74;; # \magstep4 - 25) realsize=24.88;; # \magstep5 - 30) realsize=29.86;; # \magstep6 - 36) realsize=35.83;; # \magstep7 - # The new convention is to have three or four letters for the - # font name and four digits for the pointsize. The number is - # pointsize * 100. We effectively divide by 100 by ignoring the - # last two digits. - ????|?????) realsize=`echo "$pointsize" | sed 's/\(..\)$/.\1/'`;; - *) realsize="$pointsize";; -esac - -mfname="$name.mf" -if test -r "$mfname"; then - echo "$progname: $destdir/$mfname already exists." - echo "$destdir/$mfname" >$STDOUT - "$MT_MKTEXUPD" "$destdir" "$mfname" - exit 0 -fi - -case "$name" in - ec*|tc*) - cat > "mf$$.tmp" <<END -if unknown exbase: input exbase fi; -gensize:=$realsize; -generate $rootname; -END - ;; - dc*) - cat > "mf$$.tmp" <<END -if unknown dxbase: input dxbase fi; -gensize:=$realsize; -generate $rootname; -END - ;; - cs*|lcsss*|icscsc*|icstt*|ilcsss*) - cat > "mf$$.tmp" <<END -input cscode -use_driver; -END - ;; - wn[bcdfirstuv]*|rx[bcdfiorstuvx][bcfhilmostx]*|l[abcdhl][bcdfiorstuvx]*) - cat > "mf$$.tmp" <<END -input fikparm; -END - ;; - g[lmorst][bijmtwx][cilnoru]*) - # A small superset of the names of the cbgreek fonts. - cat > "mf$$.tmp" <<END -% generated by mktexmf -input cbgreek; -END - ;; - *) - cat > "mf$$.tmp" <<END -design_size := $realsize; -input $rootname; -END - ;; -esac - -chmod `kpsestat -xst,go-w .` "mf$$.tmp" -rm -f "$mfname" -mv "mf$$.tmp" "$mfname" - -echo "$destdir/$mfname" >$STDOUT -echo "$progname: $destdir/$mfname: successfully generated." >&2 -"$MT_MKTEXUPD" "$destdir" "$mfname" -exit 0 -) 1>&2 </dev/null +../../texmf-dist/scripts/texlive/mktexmf
\ No newline at end of file diff --git a/Master/bin/armhf-linux/mktexpk b/Master/bin/armhf-linux/mktexpk index 2672dc7f78c..a0d6db0121b 100755..120000 --- a/Master/bin/armhf-linux/mktexpk +++ b/Master/bin/armhf-linux/mktexpk @@ -1,284 +1 @@ -#!/bin/sh -# original mktexpk -- make a new PK font, because one wasn't found. -# -# (If you change or delete the word `original' on the previous line, -# installation won't write this script over yours.) -# -# Originally written by Thomas Esser, Karl Berry, and Olaf Weber. -# Public domain. - -version='$Id: mktexpk 34656 2014-07-18 23:38:50Z karl $' -progname=`echo $0 | sed 's%.*/%%'` - -# preferentially use subprograms from our own directory. -mydir=`echo "$0" | sed 's,/[^/]*$,,'` -mydir=`cd "$mydir" && pwd` -PATH="$mydir:$PATH"; export PATH - -usage="Usage: $progname [OPTIONS] NAME [REDIRECT], - Create a PK font. - ---dpi DPI use resolution DPI. ---bdpi BDPI use base resolution BDPI. ---mag MAG use magnificiation MAG. ---mfmode MODE use MODE as the METAFONT mode. ---destdir DESTDIR write fonts in DESTDIR. - -Try to create a bitmap PK file for NAME at resolution DPI, with an -assumed device base resolution of BDPI, and a Metafont \`mag' of -MAG. Use MODE for the METAFONT mode. Use DESTDIR for the root of where -to install into, either the absolute directory name to use (if it starts -with a /) or relative to the default DESTDIR (if not). REDIRECT, if -supplied, is a string of the form '>&n', where n is the number of the -file descriptor which is to receive, instead of stdout, the name of the -newly created pk file. - -If you expected the font to be available as an outline, and thus this -script does not work and should not have been called, most likely the -font's .tfm name is missing from the relevant map file (e.g., -psfonts.map for dvips, pdftex.map for pdftex). These map files are -typically maintained using updmap; q.v. - -For step-by-step instructions on making new fonts known to TeX, see -http://tug.org/fonts/fontinstall.html. - -Report bugs to: tex-k@tug.org -TeX Live home page: <http://tug.org/texlive/> -" - -# Handle non-positional options, except for --version/--help -while test $# -gt 0; do - case "$1" in - --destdir) shift; DEST="$1"; shift ;; - --destdir=*) DEST=`echo "$1" | sed 's/--destdir=//'`; shift ;; - --dpi) shift; DPI="$1"; shift ;; - --dpi=*) DPI=`echo "$1" | sed 's/--dpi=//'`; shift ;; - --bdpi) shift; BDPI="$1"; shift ;; - --bdpi=*) BDPI=`echo "$1" | sed 's/--bdpi=//'`; shift ;; - --mfmode) shift; test "x$1" != "x/" && MODE="$1"; shift ;; - --mfmode=*) test "x$1" != "x--mfmode/" \ - && MODE=`echo "$1" | sed 's/--mfmode=//'`; shift ;; - --mag) shift; MAG="$1"; shift;; - --mag=*) MAG=`echo "$1" | sed '/s--mag=//'`; shift;; - --version|-version) break ;; - --help|-help) break ;; - *) break ;; - esac -done - -if test "x$2" != x; then - tail="`echo \"x$2\" | sed 's/^x>&//' | grep '^[0-9]*$'`" - if test -z "$tail"; then - echo "$progname: argument '$2' ignored - bad file number" >&2 - elif test "$tail" != 1; then - eval 'exec 1>&$tail' - fi -fi - -mt_max_args=2 - -# Common code for all scripts. -: ${MT_TEXMFMAIN=`kpsewhich --expand-path='$TEXMFMAIN'`} -: ${MT_MKTEX_OPT=`kpsewhich --format='web2c files' mktex.opt`} -test -n "$MT_MKTEX_OPT" || MT_MKTEX_OPT="$MT_TEXMFMAIN/web2c/mktex.opt" -if test ! -f "$MT_MKTEX_OPT"; then - echo "$progname: Cannot find mktex.opt; check your installation." >&2 - exit 1 -fi - -. "$MT_MKTEX_OPT" - -# Where do potential driver files belong? -case "$MT_FEATURES" in - *nomfdrivers*) - : ${MT_MFDESTDIR=`pwd`} - export MT_MFDESTDIR;; -esac - -# Since we want to pass the generated filename and only that filename -# back to the caller on standard output, we do some redirections so -# regular echo's will end up on stderr, and do an echo >$STDOUT at the end. -# Then the contents of $STDOUT will be echoed to stdout by a trap. - -# start of redirection stdout -> stderr, stdin <- /dev/null -( - -NAME=$1 - -if kpsewhich $NAME.mf >/dev/null 2>&1 || mktexmf $NAME >/dev/null 2>&1; then - # determine the progname of metafont to use; prefer mf-nowin. - if (mf-nowin --version) >/dev/null 2>&1; then - MF="mf-nowin -progname=mf" - else - MF=mf - fi - - # Check that $BDPI and $MODE are consistent; if not, ignore the mode and - # hope we can correctly guess it from bdpi. (People like to specify the - # resolution on the command line, not the mode so much.) - if test -n "$MODE"; then - mf_bdpi=`$MF \ -'\mode:='$MODE';mode_setup;message"BDPI= "&decimal round pixels_per_inch;end.'\ - </dev/null \ - | awk '/DPI=/ {print $2}'` - if test "x$mf_bdpi" != x$BDPI; then - echo "$progname: Mismatched mode $MODE and resolution $BDPI; ignoring mode." >&2 - MODE= - fi - fi - - # If an explicit mode is not supplied, try to guess. You can get a - # list of extant modes from ftp://ftp.tug.org/tex/modes.mf. - if test -z "$MODE" || test "x$MODE" = xdefault; then - case "$BDPI" in - 85) MODE=sun;; - 100) MODE=nextscrn;; - 180) MODE=toshiba;; - 300) MODE=cx;; - 360) MODE=epstylus;; - 400) MODE=nexthi;; - 600) MODE=ljfour;; - 720) MODE=epscszz;; - 1200) MODE=ultre;; - 1270) MODE=linoone;; - 8000) MODE=dpdfezzz;; - *) echo "$progname: Can't guess mode for $BDPI dpi devices." >&2 - echo "$progname: Use a config file or option to specify the mode; see:" >&2 - echo "$progname: http://tug.org/texinfohtml/kpathsea.html#Unable-to-generate-fonts" >&2 - exit 1 - esac - fi - - # Run Metafont. Always use plain Metafont, since reading cmbase.mf - # does not noticeably slow things down. - cmd="$MF \mode:=$MODE; mag:=$MAG; nonstopmode; input $NAME" -else - MODE=modeless - # ps_to_pk is set in mktex.opt - case $ps_to_pk in - gsftopk) - if $ps_to_pk -t "$NAME"; then - cmd="$ps_to_pk $NAME $DPI" - fi;; - ps2pk) - # grep for the font in $PSMAPFILE. These are base font names, such as - # rpplr (the original) or pplr0 (an interim step) or pplr8r (current). - : ${PSMAPFILE=`kpsewhich --format=map psfonts.map ps2pk.map`} - pattern="^$NAME"'([ ]|$)' - psline=`egrep "$pattern" $PSMAPFILE | tail -1` - if test -n "$psline"; then - set x `echo "$psline" | sed 's%[<["]%%g'` - shift; shift; shift; - encoding=; psname=; slant=; extend= - while test ! -z "$1"; do - case "$1" in - *.enc) encoding="-e $1";; - *.pf[ab]) psname="$1";; - *SlantFont) slant="-S $lastopt";; - *ExtendFont) extend="-E $lastopt";; - esac - lastopt="$1" - shift - done - # Guessing the name of the type1 font file as fallback: - ANAME=`echo $NAME | sed 's/8r$/8a/'` - for i in $NAME.pfa $NAME.pfb $ANAME.pfa $ANAME.pfb; do - if kpsewhich $i >/dev/null 2>&1; then - psname=$i - break - fi - done - - if [ -n "$psname" ]; then - cmd="ps2pk -v -X$DPI -R$BDPI $slant $extend $encoding $psname $NAME.${DPI}pk" - else - if gsftopk -t "$NAME"; then - echo "$progname: cannot find $NAME.pfa or $NAME.pfb. Trying gsftopk." >&2 - cmd="gsftopk $NAME $DPI" - fi - fi - fi;; - esac - - # unsupported by $ps_to_pk, try other conversions: - if test -z "$cmd"; then - if (ttf2pk -t -q $NAME) >/dev/null 2>&1; then - cmd="ttf2pk -q $NAME $DPI" - elif (hbf2gf -t -q $NAME) >/dev/null 2>&1; then - cmd="hbf2gf -q -p $NAME $DPI" - else - echo "$progname: don't know how to create bitmap font for $NAME." >&2 - echo "$progname: perhaps $NAME is missing from the map file." >&2 - exit 1 - fi - fi -fi - -OIFS=$IFS; IFS=$SEP -set x `"$MT_MKTEXNAM" $NAME $DPI $MODE $DEST`; shift -IFS=$OIFS - -PKDEST="$1" -PKDESTDIR=`echo "$PKDEST" | sed 's%/[^/][^/]*$%%'` # can't rely on dirname -PKNAME=`basename "$PKDEST"` -GFNAME=$NAME.${DPI}gf - -if test -r "$PKDESTDIR/$PKNAME"; then - echo "$progname: $PKDESTDIR/$PKNAME already exists." >&2 - echo "$PKDESTDIR/$PKNAME" >$STDOUT - "$MT_MKTEXUPD" "$PKDESTDIR" $PKNAME - exit 0 -fi - -"$MT_MKTEXDIR" "$PKDESTDIR" -if test ! -d "$PKDESTDIR"; then - echo "$progname: $MT_MKTEXDIR $PKDESTDIR failed." >&2 - exit 1 -fi - -echo "$progname: Running $cmd" -$cmd </dev/null || { - # Don't abort if only "Strange path", "bad pos" or "angle(0,0)" - # errors occurr. - grep '^!' $NAME.log | sort >$$.errs 2>/dev/null - grep '^! Strange path' $$.errs >$$.strange 2>/dev/null - grep '^! bad pos.' $$.errs >$$.badpos 2>/dev/null - grep '^! angle(0,0) is taken as zero.' $$.errs >$$.angle 2>/dev/null - cat $$.badpos $$.strange $$.angle | sort > $$.errs_accept - if cmp $$.errs $$.errs_accept >/dev/null 2>&1; then - test -s $$.strange >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused strange path errors." >&2 - test -s $$.badpos >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused bad pos errors." >&2 - test -s $$.angle >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused angle(0,0) errors." >&2 - else - echo "$progname: \`$cmd' failed." >&2 - test -s $NAME.log && mv -f $NAME.log "$KPSE_DOT" - exit 1; - fi -} - -test -r $GFNAME && { gftopk ./$GFNAME $PKNAME || exit 1; } -test ! -f $PKNAME && test -f $NAME.${DPI}pk && mv $NAME.${DPI}pk $PKNAME -if test ! -s $PKNAME; then - echo "$progname: \`$cmd' failed to make $PKNAME." >&2 - exit 1 -fi - -# Install the PK file carefully, since others may be working simultaneously. -# Use cp when mv fails, since DOS will fail mv for deeply-nested directories. -mv $PKNAME "$PKDESTDIR/pk$$.tmp" 2>/dev/null \ - || cp $PKNAME "$PKDESTDIR/pk$$.tmp" || exit 1 -cd "$PKDESTDIR" || exit 1 -chmod `kpsestat -xst,go-w .` pk$$.tmp -test -r $PKNAME || mv pk$$.tmp $PKNAME || exit 1 - -# Update ls-R if necessary. -"$MT_MKTEXUPD" "$PKDESTDIR" $PKNAME - -# If this line (or an equivalent) is not present, dvipsk/xdvik/dviljk -# will think mktexpk failed. Any other output to stdout will also lose. -echo "$PKDESTDIR/$PKNAME" >$STDOUT -echo "$progname: $PKDESTDIR/$PKNAME: successfully generated." >&2 -) 1>&2 </dev/null +../../texmf-dist/scripts/texlive/mktexpk
\ No newline at end of file diff --git a/Master/bin/armhf-linux/mktextfm b/Master/bin/armhf-linux/mktextfm index 46e30a9c5dc..70ae3a438ce 100755..120000 --- a/Master/bin/armhf-linux/mktextfm +++ b/Master/bin/armhf-linux/mktextfm @@ -1,162 +1 @@ -#!/bin/sh -# original mktextfm -- make a new TFM file, because one wasn't found. -# -# (If you change or delete the word `original' on the previous line, -# installation won't write this script over yours.) -# -# Primarily written by Thomas Esser, Karl Berry, and Olaf Weber. -# Public domain. - -version='$Id: mktextfm 34656 2014-07-18 23:38:50Z karl $' -progname=`echo $0 | sed 's%.*/%%'` - -# preferentially use subprograms from our own directory. -mydir=`echo "$0" | sed 's,/[^/]*$,,'` -mydir=`cd "$mydir" && pwd` -PATH="$mydir:$PATH"; export PATH - -usage="Usage: $progname [--destdir DESTDIR] FONT. - -Makes a TFM file for FONT, if possible. Use DESTDIR for the root of where -to install into, either the absolute directory name to use (if it starts -with a /) or relative to the default DESTDIR (if not). - -Report bugs to: tex-k@tug.org -TeX Live home page: <http://tug.org/texlive/> -" - -# Handle non-positional options, except for --version/--help -while test $# -gt 0; do - case "$1" in - --destdir) shift; DEST="$1"; shift ;; - --destdir=*) DEST=`echo "$1" | sed 's/--destdir=//'`; shift ;; - --version|-version) break ;; - --help|-help) break ;; - *) break ;; - esac -done - -# Common code for all scripts. -: ${MT_TEXMFMAIN=`kpsewhich --expand-path='$TEXMFMAIN'`} -: ${MT_MKTEX_OPT=`kpsewhich --format='web2c files' mktex.opt`} -test -n "$MT_MKTEX_OPT" || MT_MKTEX_OPT="$MT_TEXMFMAIN/web2c/mktex.opt" -if test ! -f "$MT_MKTEX_OPT"; then - echo "$progname: Cannot find mktex.opt; check your installation." >&2 - exit 1 -fi - -. "$MT_MKTEX_OPT" - -# Where do potential mf driver files go? -case "$MT_FEATURES" in - *nomfdrivers*) - : ${MT_MFDESTDIR=`pwd`} - export MT_MFDESTDIR;; -esac - -# start of redirection stdout -> stderr, stdin <- /dev/null -( - -NAME=`basename "$1" .tfm` -MAG=1 # mag=0 fails with larm1000.mf -#DEST="$2" -DPI=$BDPI - -OIFS=$IFS; IFS=$SEP -set x `"$MT_MKTEXNAM" $NAME $DPI $MODE $DEST`; shift -IFS=$OIFS - -PKDEST="$1" -TFMDEST="$2" -PKDESTDIR=`echo "$PKDEST" | sed 's%/[^/][^/]*$%%'` # can't rely on dirname -TFMDESTDIR=`echo "$TFMDEST" | sed 's%/[^/][^/]*$%%'` -PKNAME=`basename "$PKDEST"` -TFMNAME=$NAME.tfm -GFNAME=$NAME.$DPI'gf' - -if test -r "$TFMDESTDIR/$TFMNAME"; then - echo "$progname: $TFMDESTDIR/$TFMNAME already exists." >&2 - echo "$TFMDESTDIR/$TFMNAME" >$STDOUT - "$MT_MKTEXUPD" "$TFMDESTDIR" $TFMNAME - exit -fi - -# Try to create the destdir first. Do not create fonts, if this fails. -"$MT_MKTEXDIR" "$TFMDESTDIR" -if test ! -d "$TFMDESTDIR"; then - echo "$progname: mktexdir $TFMDESTDIR failed." - exit 1 -fi - -# Check if this font is supported by hbf2gf else use metafont. -if (hbf2gf -q -t $NAME) >/dev/null 2>&1; then - cmd="hbf2gf -g $NAME $DPI" -else - # determine the progname of metafont to use; prefer mf-nowin. - if (mf-nowin --version) >/dev/null 2>&1; then - MF="mf-nowin -progname=mf" - else - MF=mf - fi - - cmd="$MF \mode:=$MODE; mag:=$MAG; nonstopmode; input $NAME" -fi - -echo "$progname: Running $cmd" -$cmd </dev/null || { - # Don't abort if only "Strange path", "bad pos" or "angle(0,0)" - # errors occurr. - grep '^!' $NAME.log | sort >$$.errs 2>/dev/null - grep '^! Strange path' $$.errs >$$.strange 2>/dev/null - grep '^! bad pos.' $$.errs >$$.badpos 2>/dev/null - grep '^! angle(0,0) is taken as zero.' $$.errs >$$.angle 2>/dev/null - cat $$.badpos $$.strange $$.angle | sort > $$.errs_accept - if cmp $$.errs $$.errs_accept >/dev/null 2>&1; then - test -s $$.strange >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused strange path errors." >&2 - test -s $$.badpos >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused bad pos errors." >&2 - test -s $$.angle >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused angle(0,0) errors." >&2 - else - echo "$progname: \`$cmd' failed." >&2 - test -s $NAME.log && mv -f $NAME.log "$KPSE_DOT" - exit 1; - fi -} - -# hbf2gf just produces a .pl file: -test -r ./$NAME.pl && pltotf ./$NAME.pl $TFMNAME -test -r $TFMNAME || { echo "$progname: \`$cmd' failed to make $TFMNAME."; exit 1; } - -# Install the TFM file carefully, since others may be working simultaneously. -# Use cp when mv fails, since DOS will fail mv for deeply-nested directories. -mv $TFMNAME "$TFMDESTDIR/tfm$$.tmp" 2>/dev/null \ - || cp $TFMNAME "$TFMDESTDIR/tfm$$.tmp" || exit 1 -cd "$TFMDESTDIR" || exit 1 -chmod `kpsestat -xst,go-w .` tfm$$.tmp -test -r $TFMNAME || mv tfm$$.tmp $TFMNAME || exit 1 - -# OK, success with the TFM. -"$MT_MKTEXUPD" "$TFMDESTDIR" $TFMNAME -echo "$TFMDESTDIR/$TFMNAME" >$STDOUT -echo "$progname: $TFMDESTDIR/$TFMNAME: successfully generated." >&2 - -# Since we probably made a GF(->PK) file, too, may as well install it if -# it's needed. -cd $TEMPDIR -if test -r $GFNAME && test ! -f "$PKDESTDIR/$PKNAME"; then - gftopk ./$GFNAME $PKNAME || exit 1 - "$MT_MKTEXDIR" "$PKDESTDIR" - mv $PKNAME "$PKDESTDIR/pk$$.tmp" 2>/dev/null \ - || cp $PKNAME "$PKDESTDIR/pk$$.tmp" || exit 1 - cd "$PKDESTDIR" || exit 1 - if test -f $PKNAME; then - rm -f pk$$.tmp - else - chmod `kpsestat -xst,go-w .` pk$$.tmp - mv pk$$.tmp $PKNAME - "$MT_MKTEXUPD" "$PKDESTDIR" $PKNAME - fi -fi -) 1>&2 </dev/null +../../texmf-dist/scripts/texlive/mktextfm
\ No newline at end of file diff --git a/Master/bin/i386-cygwin/mktexlsr b/Master/bin/i386-cygwin/mktexlsr index 5fde39e2c2d..a36378a2b9f 100755..120000 --- a/Master/bin/i386-cygwin/mktexlsr +++ b/Master/bin/i386-cygwin/mktexlsr @@ -1,236 +1 @@ -#!/bin/sh -# original mktexlsr -- create or rebuild ls-R. -# -# (If you change or delete the word `original' on the previous line, -# installation won't write this script over yours.) -# -# Suitable for calling from cron, as in: -# 0 * * * * cd /your/texmf/root && /usr/local/texlive/bin/mktexlsr -# -# Originally written as `texhash' by Thomas Esser, Okt., 1994. -# Public domain. - -version='$Id: mktexlsr 46343 2018-01-17 00:55:32Z preining $' -progname=`echo $0 | sed 's%.*/%%'` - -usage="Usage: $progname [OPTION]... [DIR]... - -Rebuild ls-R filename databases used by TeX. If one or more arguments -DIRS are given, these are used as the directories in which to build -ls-R. Else all directories in the search path for ls-R files -(\$TEXMFDBS) are used. - -Options: - --dry-run do not actually update anything - --help display this help and exit - --quiet cancel --verbose - --silent same as --quiet - --verbose explain what is being done - --version output version information and exit - -If standard input is a terminal, --verbose is on by default. - -For more information, see the \`Filename database' section of -Kpathsea manual available at http://tug.org/kpathsea. - -Report bugs to: tex-k@tug.org -TeX Live home page: <http://tug.org/texlive/> -" - -# The simple PATH-prepending approach we take in other scripts doesn't -# handle DOS/Windows, but we don't use the shell scripts on Windows -# anyway, and does anyone want current TL on DOS or DJGPP? Maybe they -# can maintain their own changes if so. Leaving this code though, since -# it's always been here ... - -# MS-DOS and MS-Windows define $COMSPEC or $ComSpec and use `;' to separate -# directories in path lists whereas Unix uses `:'. Make an exception for -# Cygwin, which pretends to be UNIX. -# Create a variable that holds the right character to be used by the scripts. -DOSISH=no -case `uname -s` in - CYGWIN*|Cygwin*|cygwin*) ;; - *) if test -n "$COMSPEC" || test -n "$ComSpec"; then DOSISH=yes; fi -esac -if test "$DOSISH" = "no"; then SEP=':'; else SEP=';';fi - -# Add the location of the script to the PATH if necessary. This must -# be done before kpsewhich can be called, and thus cannot be put into -# mktex.opt. -dirname=`echo $0 | sed 's%/*[^/][^/]*$%%'` -case $dirname in - "") # Do nothing - ;; - /* | [A-z]:/*) # Absolute name - PATH="$dirname$SEP$PATH" - export PATH ;; - *) # Relative name - PATH="`pwd`/$dirname$SEP$PATH" - export PATH ;; -esac - -if tty -s; then verbose=true; else verbose=false; fi -dry_run=false -trees= - -# initialize treefile by either mktemp or some random name -# code taken from pdfjam and adjusted -{ - treefile=` - (umask 077 && mktemp "${TMPDIR-/tmp}/mktexlsrtrees.XXXXXXXXXX") 2>/dev/null - ` && test -n "$treefile" && test -f "$treefile" -} || { - ## We'll use awk to make random number, for portability - random=`awk 'END { srand(); printf ("%d\n", rand()*1000000); }' /dev/null` - treefile="${TMPDIR-/tmp}/mktexlsrtrees$$.$random" -} || exit $? - -trap 'cd /; rm -f $treefile; test -z "$db_dir_tmp" || rm -rf "$db_dir_tmp"; - exit' 0 1 2 3 7 13 15 - -# A copy of some stuff from mktex.opt, so we can run in the presence of -# terminally damaged ls-R files. -while test $# -gt 0; do - if test "x$1" = x--help || test "x$1" = x-help; then - echo "$usage" - exit 0 - elif test "x$1" = x--version || test "x$1" = x-version; then - echo "`basename $0` $version" - kpsewhich --version - exit 0 - elif test "x$1" = x--verbose || test "x$1" = x-verbose; then - verbose=true - elif test "x$1" = x--dry-run || test "x$1" = x-n; then - dry_run=true - elif test "x$1" = x--quiet || test "x$1" = x--silent \ - || test "x$1" = x-quiet || test "x$1" = x-silent ; then - verbose=false - elif test "x$1" = x--; then - : - elif echo "x$1" | grep '^x-' >/dev/null; then - echo "$progname: unknown option \`$1', try --help if you need it." >&2 - exit 1 - else - if test ! -d "$1"; then - echo "$progname: $1: not a directory, skipping." >&2 - shift - continue - fi - # By saving the argument in a file, we can later get it back while - # supporting spaces in the name. This still doesn't support - # newlines in the directory names, but nobody ever complains about - # that, and it seems much too much trouble to use \0 terminators. - (umask 077 - if echo "$1" >>"$treefile"; then :; else - echo "$progname: $treefile: could not append to arg file, goodbye." >&2 - exit 1 - fi - ) - fi - shift -done - -# mktexupd and mktexlsr make sure they're coordinated via this. A copy -# is found mktex.opt. -ls_R_magic='% ls-R -- filename database for kpathsea; do not change this line.' -# The old string, which should continue to work. -old_ls_R_magic='% ls-R -- maintained by MakeTeXls-R; do not change this line.' - -{ - # Get list of directories from the explicit arguments (now saved in - # $treefile), or $TEXMFDBS if no explicit args. Eliminate duplicates. - saveIFS=$IFS # break only at newline - IFS=' -' - if test -s "$treefile"; then - set x `sort "$treefile" | uniq` - else - set x `kpsewhich --show-path=ls-R | tr : ' -' | sort | uniq` - fi - IFS=$saveIFS - shift -} - -for TEXMFLS_R in "$@"; do - # Prepend cwd if the directory was relative. - case "$TEXMFLS_R" in - "") continue ;; # Strictly speaking, it is an error if this case is taken. - /* | [A-z]:/*) ;; - *) TEXMFLS_R="`pwd`/$TEXMFLS_R" - esac - # Allow for either ls-R and ls-r to exist. But create ls-R if we're - # working from scratch. - if test -f "$TEXMFLS_R/ls-R"; then - db_file="$TEXMFLS_R/ls-R" - elif test -f "$TEXMFLS_R/ls-r"; then - db_file="$TEXMFLS_R/ls-r" - else - db_file="$TEXMFLS_R/ls-R" - fi - # Follow a possible symlink to get the right filesystem. - # The '|| true' construct prevents an sh -e aborting. - db_readlink=`kpsereadlink "$TEXMFLS_R/ls-R" 2>/dev/null` || true - case "$db_readlink" in - "") ;; - /* | [A-z]:/*) db_file="$db_readlink" ;; - *) db_file="$TEXMFLS_R/$db_readlink" - esac - db_dir=`echo "$db_file" | sed 's%/[^/][^/]*$%%'` # can't rely on dirname - - # want to be silent if the directory doesn't exist, since the ls-R - # path ordinarily contains many nonexistent directories. - test -d "$db_dir" || continue - test -w "$db_dir" || { echo "$progname: $db_dir: directory not writable. Skipping..." >&2; continue; } - - if test ! -f "$db_file"; then - cp /dev/null "$db_file" - # Use same permissions as parent directory, minus x,s, or t bits. - chmod `kpsestat -xst "$db_dir"` "$db_file" - elif test -s "$db_file" \ - && test "x`sed '1s/
$//;1q' \"$db_file\"`" != "x$ls_R_magic" \ - && test "x`sed '1s/
$//;1q' \"$db_file\"`" != "x$old_ls_R_magic"; then - echo "$progname: $db_file: no magic string, skipping..." >&2 - continue - fi - - # Skip if we cannot write the file: - kpseaccess -w "$db_file" || { echo "$progname: $db_file: no write permission, skipping..." >&2; continue; } - - db_dir_tmp="$db_dir/lsR$$.tmp" - (umask 077 && mkdir "$db_dir_tmp" ) \ - || { echo "$progname: $db_dir_tmp: could not create directory, skipping..." >&2; continue; } - db_file_tmp="$db_dir_tmp/lsR$$.tmp" - rm -f "$db_file_tmp" - - $verbose && echo "$progname: Updating $db_file... " - $dry_run && continue - - echo "$ls_R_magic" >"$db_file_tmp" - - # The main task. We put ./: in the output, so top-level files can be - # found via ls-R. Probably irrelevant in practice. The sed command - # inserts the leading ./ for directory names, and removes ., .., and - # version control entries from the list. Also omit contents of any - # the version directories; sed apparently requires that we do that - # operation in a separate invocation. We do not try to support colons - # in directory names. - # - echo "./:" >>"$db_file_tmp" - vc_dirs='\.\(bzr\|git\|hg\|svn\)\|_darcs' - (cd "$TEXMFLS_R" && \ls -LRa 2>/dev/null) \ - | sed -e '/^$/{n;s%^\./%%;s%^%./%;}; /^\.$/d; /^\.\.$/d; /^'$vc_dirs'$/d;' \ - -e '/^[\.\/]*lsR[0-9]*\.tmp:*$/d' \ - | sed -e /$vc_dirs'.*:$/,/^$/d' \ - >>"$db_file_tmp" - - # To be really safe, a loop. - until PERMS=`kpsestat = "$db_file"`; do sleep 1; done - chmod $PERMS "$db_file_tmp" - rm -f "$db_file" - mv "$db_file_tmp" "$db_file" - rm -rf "$db_dir_tmp" -done - -$verbose && echo "$progname: Done." -exit 0 +../../texmf-dist/scripts/texlive/mktexlsr
\ No newline at end of file diff --git a/Master/bin/i386-cygwin/mktexmf b/Master/bin/i386-cygwin/mktexmf index bb868c12a8d..302c00f763e 100755..120000 --- a/Master/bin/i386-cygwin/mktexmf +++ b/Master/bin/i386-cygwin/mktexmf @@ -1,151 +1 @@ -#!/bin/sh -# original mktexmf -- make a new MF file, because one wasn't found. -# -# (If you change or delete the word `original' on the previous line, -# installation won't write this script over yours.) -# -# Originally written by Thomas Esser. -# Public domain. - -version='$Id: mktexmf 34656 2014-07-18 23:38:50Z karl $' - -# preferentially use subprograms from our own directory. -mydir=`echo "$0" | sed 's,/[^/]*$,,'` -mydir=`cd "$mydir" && pwd` -PATH="$mydir:$PATH"; export PATH - -usage="Usage: $0 FONT. - -Makes the Metafont source file for FONT, if possible. For example, -\`ecr12' or \`cmr11'. - -Report bugs to: tex-k@tug.org -TeX Live home page: <http://tug.org/texlive/> -" - -# Common code for all scripts. -: ${MT_TEXMFMAIN=`kpsewhich --expand-path='$TEXMFMAIN'`} -: ${MT_MKTEX_OPT=`kpsewhich --format='web2c files' mktex.opt`} -test -n "$MT_MKTEX_OPT" || MT_MKTEX_OPT="$MT_TEXMFMAIN/web2c/mktex.opt" -if test ! -f "$MT_MKTEX_OPT"; then - echo "$progname: Cannot find mktex.opt; check your installation." >&2 - exit 1 -fi - -. "$MT_MKTEX_OPT" - -( -# See comments in mktexpk. -name="`echo $1 | sed 's%.*/%%; s%\.mf$%%'`" -rootname=`echo "$name" | sed 's/[0-9]*$//'` -pointsize=`echo "$name" | sed "s/^$rootname//"` - -sauterroot=`kpsewhich b-$rootname.mf 2>/dev/null` -if test -n "$sauterroot"; then - rootfile=$sauterroot - rootname=b-$rootname -else - case $name in - # csso12[0-5][0-9] from CJK package; unsupported by mktexmf - csso12[0-5][0-9]) - rootfile=;; - *) - case $rootname in - cs*|lcsss*|icscsc*|icstt*|ilcsss*) - rootfile=`kpsewhich cscode.mf`;; - wn[bcdfirstuv]*|rx[bcdfiorstuvx][bcfhilmostx]|l[abcdhl][bcdfiorstuvx]*) - lhprefix=`echo "$name" | sed 's/^\(..\).*/\1/'` - rootfile=`kpsewhich ${lhprefix}codes.mf 2>/dev/null`;; - *) - rootfile=`kpsewhich $rootname.mf 2>/dev/null`;; - esac;; - esac -fi -{ test -z "$rootfile" || test ! -f "$rootfile"; } && exit 1 - -#if test -z "$MT_MFNAME"; then -OIFS=$IFS; IFS=$SEP -set x `"$MT_MKTEXNAM" $name`; shift -IFS=$OIFS -MT_MFNAME="$3" -#fi - -destdir=`echo "$MT_MFNAME" | sed 's%/[^/][^/]*$%%'` -test -d "$destdir" || "$MT_MKTEXDIR" "$destdir" || exit 1 -cd "$destdir" || exit 1 - -case "$pointsize" in - "") echo "$progname: no pointsize."; exit 1;; - 11) realsize=10.95;; # \magstephalf - 14) realsize=14.4;; # \magstep2 - 17) realsize=17.28;; # \magstep3 - 20) realsize=20.74;; # \magstep4 - 25) realsize=24.88;; # \magstep5 - 30) realsize=29.86;; # \magstep6 - 36) realsize=35.83;; # \magstep7 - # The new convention is to have three or four letters for the - # font name and four digits for the pointsize. The number is - # pointsize * 100. We effectively divide by 100 by ignoring the - # last two digits. - ????|?????) realsize=`echo "$pointsize" | sed 's/\(..\)$/.\1/'`;; - *) realsize="$pointsize";; -esac - -mfname="$name.mf" -if test -r "$mfname"; then - echo "$progname: $destdir/$mfname already exists." - echo "$destdir/$mfname" >$STDOUT - "$MT_MKTEXUPD" "$destdir" "$mfname" - exit 0 -fi - -case "$name" in - ec*|tc*) - cat > "mf$$.tmp" <<END -if unknown exbase: input exbase fi; -gensize:=$realsize; -generate $rootname; -END - ;; - dc*) - cat > "mf$$.tmp" <<END -if unknown dxbase: input dxbase fi; -gensize:=$realsize; -generate $rootname; -END - ;; - cs*|lcsss*|icscsc*|icstt*|ilcsss*) - cat > "mf$$.tmp" <<END -input cscode -use_driver; -END - ;; - wn[bcdfirstuv]*|rx[bcdfiorstuvx][bcfhilmostx]*|l[abcdhl][bcdfiorstuvx]*) - cat > "mf$$.tmp" <<END -input fikparm; -END - ;; - g[lmorst][bijmtwx][cilnoru]*) - # A small superset of the names of the cbgreek fonts. - cat > "mf$$.tmp" <<END -% generated by mktexmf -input cbgreek; -END - ;; - *) - cat > "mf$$.tmp" <<END -design_size := $realsize; -input $rootname; -END - ;; -esac - -chmod `kpsestat -xst,go-w .` "mf$$.tmp" -rm -f "$mfname" -mv "mf$$.tmp" "$mfname" - -echo "$destdir/$mfname" >$STDOUT -echo "$progname: $destdir/$mfname: successfully generated." >&2 -"$MT_MKTEXUPD" "$destdir" "$mfname" -exit 0 -) 1>&2 </dev/null +../../texmf-dist/scripts/texlive/mktexmf
\ No newline at end of file diff --git a/Master/bin/i386-cygwin/mktexpk b/Master/bin/i386-cygwin/mktexpk index 2672dc7f78c..a0d6db0121b 100755..120000 --- a/Master/bin/i386-cygwin/mktexpk +++ b/Master/bin/i386-cygwin/mktexpk @@ -1,284 +1 @@ -#!/bin/sh -# original mktexpk -- make a new PK font, because one wasn't found. -# -# (If you change or delete the word `original' on the previous line, -# installation won't write this script over yours.) -# -# Originally written by Thomas Esser, Karl Berry, and Olaf Weber. -# Public domain. - -version='$Id: mktexpk 34656 2014-07-18 23:38:50Z karl $' -progname=`echo $0 | sed 's%.*/%%'` - -# preferentially use subprograms from our own directory. -mydir=`echo "$0" | sed 's,/[^/]*$,,'` -mydir=`cd "$mydir" && pwd` -PATH="$mydir:$PATH"; export PATH - -usage="Usage: $progname [OPTIONS] NAME [REDIRECT], - Create a PK font. - ---dpi DPI use resolution DPI. ---bdpi BDPI use base resolution BDPI. ---mag MAG use magnificiation MAG. ---mfmode MODE use MODE as the METAFONT mode. ---destdir DESTDIR write fonts in DESTDIR. - -Try to create a bitmap PK file for NAME at resolution DPI, with an -assumed device base resolution of BDPI, and a Metafont \`mag' of -MAG. Use MODE for the METAFONT mode. Use DESTDIR for the root of where -to install into, either the absolute directory name to use (if it starts -with a /) or relative to the default DESTDIR (if not). REDIRECT, if -supplied, is a string of the form '>&n', where n is the number of the -file descriptor which is to receive, instead of stdout, the name of the -newly created pk file. - -If you expected the font to be available as an outline, and thus this -script does not work and should not have been called, most likely the -font's .tfm name is missing from the relevant map file (e.g., -psfonts.map for dvips, pdftex.map for pdftex). These map files are -typically maintained using updmap; q.v. - -For step-by-step instructions on making new fonts known to TeX, see -http://tug.org/fonts/fontinstall.html. - -Report bugs to: tex-k@tug.org -TeX Live home page: <http://tug.org/texlive/> -" - -# Handle non-positional options, except for --version/--help -while test $# -gt 0; do - case "$1" in - --destdir) shift; DEST="$1"; shift ;; - --destdir=*) DEST=`echo "$1" | sed 's/--destdir=//'`; shift ;; - --dpi) shift; DPI="$1"; shift ;; - --dpi=*) DPI=`echo "$1" | sed 's/--dpi=//'`; shift ;; - --bdpi) shift; BDPI="$1"; shift ;; - --bdpi=*) BDPI=`echo "$1" | sed 's/--bdpi=//'`; shift ;; - --mfmode) shift; test "x$1" != "x/" && MODE="$1"; shift ;; - --mfmode=*) test "x$1" != "x--mfmode/" \ - && MODE=`echo "$1" | sed 's/--mfmode=//'`; shift ;; - --mag) shift; MAG="$1"; shift;; - --mag=*) MAG=`echo "$1" | sed '/s--mag=//'`; shift;; - --version|-version) break ;; - --help|-help) break ;; - *) break ;; - esac -done - -if test "x$2" != x; then - tail="`echo \"x$2\" | sed 's/^x>&//' | grep '^[0-9]*$'`" - if test -z "$tail"; then - echo "$progname: argument '$2' ignored - bad file number" >&2 - elif test "$tail" != 1; then - eval 'exec 1>&$tail' - fi -fi - -mt_max_args=2 - -# Common code for all scripts. -: ${MT_TEXMFMAIN=`kpsewhich --expand-path='$TEXMFMAIN'`} -: ${MT_MKTEX_OPT=`kpsewhich --format='web2c files' mktex.opt`} -test -n "$MT_MKTEX_OPT" || MT_MKTEX_OPT="$MT_TEXMFMAIN/web2c/mktex.opt" -if test ! -f "$MT_MKTEX_OPT"; then - echo "$progname: Cannot find mktex.opt; check your installation." >&2 - exit 1 -fi - -. "$MT_MKTEX_OPT" - -# Where do potential driver files belong? -case "$MT_FEATURES" in - *nomfdrivers*) - : ${MT_MFDESTDIR=`pwd`} - export MT_MFDESTDIR;; -esac - -# Since we want to pass the generated filename and only that filename -# back to the caller on standard output, we do some redirections so -# regular echo's will end up on stderr, and do an echo >$STDOUT at the end. -# Then the contents of $STDOUT will be echoed to stdout by a trap. - -# start of redirection stdout -> stderr, stdin <- /dev/null -( - -NAME=$1 - -if kpsewhich $NAME.mf >/dev/null 2>&1 || mktexmf $NAME >/dev/null 2>&1; then - # determine the progname of metafont to use; prefer mf-nowin. - if (mf-nowin --version) >/dev/null 2>&1; then - MF="mf-nowin -progname=mf" - else - MF=mf - fi - - # Check that $BDPI and $MODE are consistent; if not, ignore the mode and - # hope we can correctly guess it from bdpi. (People like to specify the - # resolution on the command line, not the mode so much.) - if test -n "$MODE"; then - mf_bdpi=`$MF \ -'\mode:='$MODE';mode_setup;message"BDPI= "&decimal round pixels_per_inch;end.'\ - </dev/null \ - | awk '/DPI=/ {print $2}'` - if test "x$mf_bdpi" != x$BDPI; then - echo "$progname: Mismatched mode $MODE and resolution $BDPI; ignoring mode." >&2 - MODE= - fi - fi - - # If an explicit mode is not supplied, try to guess. You can get a - # list of extant modes from ftp://ftp.tug.org/tex/modes.mf. - if test -z "$MODE" || test "x$MODE" = xdefault; then - case "$BDPI" in - 85) MODE=sun;; - 100) MODE=nextscrn;; - 180) MODE=toshiba;; - 300) MODE=cx;; - 360) MODE=epstylus;; - 400) MODE=nexthi;; - 600) MODE=ljfour;; - 720) MODE=epscszz;; - 1200) MODE=ultre;; - 1270) MODE=linoone;; - 8000) MODE=dpdfezzz;; - *) echo "$progname: Can't guess mode for $BDPI dpi devices." >&2 - echo "$progname: Use a config file or option to specify the mode; see:" >&2 - echo "$progname: http://tug.org/texinfohtml/kpathsea.html#Unable-to-generate-fonts" >&2 - exit 1 - esac - fi - - # Run Metafont. Always use plain Metafont, since reading cmbase.mf - # does not noticeably slow things down. - cmd="$MF \mode:=$MODE; mag:=$MAG; nonstopmode; input $NAME" -else - MODE=modeless - # ps_to_pk is set in mktex.opt - case $ps_to_pk in - gsftopk) - if $ps_to_pk -t "$NAME"; then - cmd="$ps_to_pk $NAME $DPI" - fi;; - ps2pk) - # grep for the font in $PSMAPFILE. These are base font names, such as - # rpplr (the original) or pplr0 (an interim step) or pplr8r (current). - : ${PSMAPFILE=`kpsewhich --format=map psfonts.map ps2pk.map`} - pattern="^$NAME"'([ ]|$)' - psline=`egrep "$pattern" $PSMAPFILE | tail -1` - if test -n "$psline"; then - set x `echo "$psline" | sed 's%[<["]%%g'` - shift; shift; shift; - encoding=; psname=; slant=; extend= - while test ! -z "$1"; do - case "$1" in - *.enc) encoding="-e $1";; - *.pf[ab]) psname="$1";; - *SlantFont) slant="-S $lastopt";; - *ExtendFont) extend="-E $lastopt";; - esac - lastopt="$1" - shift - done - # Guessing the name of the type1 font file as fallback: - ANAME=`echo $NAME | sed 's/8r$/8a/'` - for i in $NAME.pfa $NAME.pfb $ANAME.pfa $ANAME.pfb; do - if kpsewhich $i >/dev/null 2>&1; then - psname=$i - break - fi - done - - if [ -n "$psname" ]; then - cmd="ps2pk -v -X$DPI -R$BDPI $slant $extend $encoding $psname $NAME.${DPI}pk" - else - if gsftopk -t "$NAME"; then - echo "$progname: cannot find $NAME.pfa or $NAME.pfb. Trying gsftopk." >&2 - cmd="gsftopk $NAME $DPI" - fi - fi - fi;; - esac - - # unsupported by $ps_to_pk, try other conversions: - if test -z "$cmd"; then - if (ttf2pk -t -q $NAME) >/dev/null 2>&1; then - cmd="ttf2pk -q $NAME $DPI" - elif (hbf2gf -t -q $NAME) >/dev/null 2>&1; then - cmd="hbf2gf -q -p $NAME $DPI" - else - echo "$progname: don't know how to create bitmap font for $NAME." >&2 - echo "$progname: perhaps $NAME is missing from the map file." >&2 - exit 1 - fi - fi -fi - -OIFS=$IFS; IFS=$SEP -set x `"$MT_MKTEXNAM" $NAME $DPI $MODE $DEST`; shift -IFS=$OIFS - -PKDEST="$1" -PKDESTDIR=`echo "$PKDEST" | sed 's%/[^/][^/]*$%%'` # can't rely on dirname -PKNAME=`basename "$PKDEST"` -GFNAME=$NAME.${DPI}gf - -if test -r "$PKDESTDIR/$PKNAME"; then - echo "$progname: $PKDESTDIR/$PKNAME already exists." >&2 - echo "$PKDESTDIR/$PKNAME" >$STDOUT - "$MT_MKTEXUPD" "$PKDESTDIR" $PKNAME - exit 0 -fi - -"$MT_MKTEXDIR" "$PKDESTDIR" -if test ! -d "$PKDESTDIR"; then - echo "$progname: $MT_MKTEXDIR $PKDESTDIR failed." >&2 - exit 1 -fi - -echo "$progname: Running $cmd" -$cmd </dev/null || { - # Don't abort if only "Strange path", "bad pos" or "angle(0,0)" - # errors occurr. - grep '^!' $NAME.log | sort >$$.errs 2>/dev/null - grep '^! Strange path' $$.errs >$$.strange 2>/dev/null - grep '^! bad pos.' $$.errs >$$.badpos 2>/dev/null - grep '^! angle(0,0) is taken as zero.' $$.errs >$$.angle 2>/dev/null - cat $$.badpos $$.strange $$.angle | sort > $$.errs_accept - if cmp $$.errs $$.errs_accept >/dev/null 2>&1; then - test -s $$.strange >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused strange path errors." >&2 - test -s $$.badpos >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused bad pos errors." >&2 - test -s $$.angle >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused angle(0,0) errors." >&2 - else - echo "$progname: \`$cmd' failed." >&2 - test -s $NAME.log && mv -f $NAME.log "$KPSE_DOT" - exit 1; - fi -} - -test -r $GFNAME && { gftopk ./$GFNAME $PKNAME || exit 1; } -test ! -f $PKNAME && test -f $NAME.${DPI}pk && mv $NAME.${DPI}pk $PKNAME -if test ! -s $PKNAME; then - echo "$progname: \`$cmd' failed to make $PKNAME." >&2 - exit 1 -fi - -# Install the PK file carefully, since others may be working simultaneously. -# Use cp when mv fails, since DOS will fail mv for deeply-nested directories. -mv $PKNAME "$PKDESTDIR/pk$$.tmp" 2>/dev/null \ - || cp $PKNAME "$PKDESTDIR/pk$$.tmp" || exit 1 -cd "$PKDESTDIR" || exit 1 -chmod `kpsestat -xst,go-w .` pk$$.tmp -test -r $PKNAME || mv pk$$.tmp $PKNAME || exit 1 - -# Update ls-R if necessary. -"$MT_MKTEXUPD" "$PKDESTDIR" $PKNAME - -# If this line (or an equivalent) is not present, dvipsk/xdvik/dviljk -# will think mktexpk failed. Any other output to stdout will also lose. -echo "$PKDESTDIR/$PKNAME" >$STDOUT -echo "$progname: $PKDESTDIR/$PKNAME: successfully generated." >&2 -) 1>&2 </dev/null +../../texmf-dist/scripts/texlive/mktexpk
\ No newline at end of file diff --git a/Master/bin/i386-cygwin/mktextfm b/Master/bin/i386-cygwin/mktextfm index 46e30a9c5dc..70ae3a438ce 100755..120000 --- a/Master/bin/i386-cygwin/mktextfm +++ b/Master/bin/i386-cygwin/mktextfm @@ -1,162 +1 @@ -#!/bin/sh -# original mktextfm -- make a new TFM file, because one wasn't found. -# -# (If you change or delete the word `original' on the previous line, -# installation won't write this script over yours.) -# -# Primarily written by Thomas Esser, Karl Berry, and Olaf Weber. -# Public domain. - -version='$Id: mktextfm 34656 2014-07-18 23:38:50Z karl $' -progname=`echo $0 | sed 's%.*/%%'` - -# preferentially use subprograms from our own directory. -mydir=`echo "$0" | sed 's,/[^/]*$,,'` -mydir=`cd "$mydir" && pwd` -PATH="$mydir:$PATH"; export PATH - -usage="Usage: $progname [--destdir DESTDIR] FONT. - -Makes a TFM file for FONT, if possible. Use DESTDIR for the root of where -to install into, either the absolute directory name to use (if it starts -with a /) or relative to the default DESTDIR (if not). - -Report bugs to: tex-k@tug.org -TeX Live home page: <http://tug.org/texlive/> -" - -# Handle non-positional options, except for --version/--help -while test $# -gt 0; do - case "$1" in - --destdir) shift; DEST="$1"; shift ;; - --destdir=*) DEST=`echo "$1" | sed 's/--destdir=//'`; shift ;; - --version|-version) break ;; - --help|-help) break ;; - *) break ;; - esac -done - -# Common code for all scripts. -: ${MT_TEXMFMAIN=`kpsewhich --expand-path='$TEXMFMAIN'`} -: ${MT_MKTEX_OPT=`kpsewhich --format='web2c files' mktex.opt`} -test -n "$MT_MKTEX_OPT" || MT_MKTEX_OPT="$MT_TEXMFMAIN/web2c/mktex.opt" -if test ! -f "$MT_MKTEX_OPT"; then - echo "$progname: Cannot find mktex.opt; check your installation." >&2 - exit 1 -fi - -. "$MT_MKTEX_OPT" - -# Where do potential mf driver files go? -case "$MT_FEATURES" in - *nomfdrivers*) - : ${MT_MFDESTDIR=`pwd`} - export MT_MFDESTDIR;; -esac - -# start of redirection stdout -> stderr, stdin <- /dev/null -( - -NAME=`basename "$1" .tfm` -MAG=1 # mag=0 fails with larm1000.mf -#DEST="$2" -DPI=$BDPI - -OIFS=$IFS; IFS=$SEP -set x `"$MT_MKTEXNAM" $NAME $DPI $MODE $DEST`; shift -IFS=$OIFS - -PKDEST="$1" -TFMDEST="$2" -PKDESTDIR=`echo "$PKDEST" | sed 's%/[^/][^/]*$%%'` # can't rely on dirname -TFMDESTDIR=`echo "$TFMDEST" | sed 's%/[^/][^/]*$%%'` -PKNAME=`basename "$PKDEST"` -TFMNAME=$NAME.tfm -GFNAME=$NAME.$DPI'gf' - -if test -r "$TFMDESTDIR/$TFMNAME"; then - echo "$progname: $TFMDESTDIR/$TFMNAME already exists." >&2 - echo "$TFMDESTDIR/$TFMNAME" >$STDOUT - "$MT_MKTEXUPD" "$TFMDESTDIR" $TFMNAME - exit -fi - -# Try to create the destdir first. Do not create fonts, if this fails. -"$MT_MKTEXDIR" "$TFMDESTDIR" -if test ! -d "$TFMDESTDIR"; then - echo "$progname: mktexdir $TFMDESTDIR failed." - exit 1 -fi - -# Check if this font is supported by hbf2gf else use metafont. -if (hbf2gf -q -t $NAME) >/dev/null 2>&1; then - cmd="hbf2gf -g $NAME $DPI" -else - # determine the progname of metafont to use; prefer mf-nowin. - if (mf-nowin --version) >/dev/null 2>&1; then - MF="mf-nowin -progname=mf" - else - MF=mf - fi - - cmd="$MF \mode:=$MODE; mag:=$MAG; nonstopmode; input $NAME" -fi - -echo "$progname: Running $cmd" -$cmd </dev/null || { - # Don't abort if only "Strange path", "bad pos" or "angle(0,0)" - # errors occurr. - grep '^!' $NAME.log | sort >$$.errs 2>/dev/null - grep '^! Strange path' $$.errs >$$.strange 2>/dev/null - grep '^! bad pos.' $$.errs >$$.badpos 2>/dev/null - grep '^! angle(0,0) is taken as zero.' $$.errs >$$.angle 2>/dev/null - cat $$.badpos $$.strange $$.angle | sort > $$.errs_accept - if cmp $$.errs $$.errs_accept >/dev/null 2>&1; then - test -s $$.strange >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused strange path errors." >&2 - test -s $$.badpos >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused bad pos errors." >&2 - test -s $$.angle >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused angle(0,0) errors." >&2 - else - echo "$progname: \`$cmd' failed." >&2 - test -s $NAME.log && mv -f $NAME.log "$KPSE_DOT" - exit 1; - fi -} - -# hbf2gf just produces a .pl file: -test -r ./$NAME.pl && pltotf ./$NAME.pl $TFMNAME -test -r $TFMNAME || { echo "$progname: \`$cmd' failed to make $TFMNAME."; exit 1; } - -# Install the TFM file carefully, since others may be working simultaneously. -# Use cp when mv fails, since DOS will fail mv for deeply-nested directories. -mv $TFMNAME "$TFMDESTDIR/tfm$$.tmp" 2>/dev/null \ - || cp $TFMNAME "$TFMDESTDIR/tfm$$.tmp" || exit 1 -cd "$TFMDESTDIR" || exit 1 -chmod `kpsestat -xst,go-w .` tfm$$.tmp -test -r $TFMNAME || mv tfm$$.tmp $TFMNAME || exit 1 - -# OK, success with the TFM. -"$MT_MKTEXUPD" "$TFMDESTDIR" $TFMNAME -echo "$TFMDESTDIR/$TFMNAME" >$STDOUT -echo "$progname: $TFMDESTDIR/$TFMNAME: successfully generated." >&2 - -# Since we probably made a GF(->PK) file, too, may as well install it if -# it's needed. -cd $TEMPDIR -if test -r $GFNAME && test ! -f "$PKDESTDIR/$PKNAME"; then - gftopk ./$GFNAME $PKNAME || exit 1 - "$MT_MKTEXDIR" "$PKDESTDIR" - mv $PKNAME "$PKDESTDIR/pk$$.tmp" 2>/dev/null \ - || cp $PKNAME "$PKDESTDIR/pk$$.tmp" || exit 1 - cd "$PKDESTDIR" || exit 1 - if test -f $PKNAME; then - rm -f pk$$.tmp - else - chmod `kpsestat -xst,go-w .` pk$$.tmp - mv pk$$.tmp $PKNAME - "$MT_MKTEXUPD" "$PKDESTDIR" $PKNAME - fi -fi -) 1>&2 </dev/null +../../texmf-dist/scripts/texlive/mktextfm
\ No newline at end of file diff --git a/Master/bin/i386-freebsd/mktexlsr b/Master/bin/i386-freebsd/mktexlsr index 5fde39e2c2d..a36378a2b9f 100755..120000 --- a/Master/bin/i386-freebsd/mktexlsr +++ b/Master/bin/i386-freebsd/mktexlsr @@ -1,236 +1 @@ -#!/bin/sh -# original mktexlsr -- create or rebuild ls-R. -# -# (If you change or delete the word `original' on the previous line, -# installation won't write this script over yours.) -# -# Suitable for calling from cron, as in: -# 0 * * * * cd /your/texmf/root && /usr/local/texlive/bin/mktexlsr -# -# Originally written as `texhash' by Thomas Esser, Okt., 1994. -# Public domain. - -version='$Id: mktexlsr 46343 2018-01-17 00:55:32Z preining $' -progname=`echo $0 | sed 's%.*/%%'` - -usage="Usage: $progname [OPTION]... [DIR]... - -Rebuild ls-R filename databases used by TeX. If one or more arguments -DIRS are given, these are used as the directories in which to build -ls-R. Else all directories in the search path for ls-R files -(\$TEXMFDBS) are used. - -Options: - --dry-run do not actually update anything - --help display this help and exit - --quiet cancel --verbose - --silent same as --quiet - --verbose explain what is being done - --version output version information and exit - -If standard input is a terminal, --verbose is on by default. - -For more information, see the \`Filename database' section of -Kpathsea manual available at http://tug.org/kpathsea. - -Report bugs to: tex-k@tug.org -TeX Live home page: <http://tug.org/texlive/> -" - -# The simple PATH-prepending approach we take in other scripts doesn't -# handle DOS/Windows, but we don't use the shell scripts on Windows -# anyway, and does anyone want current TL on DOS or DJGPP? Maybe they -# can maintain their own changes if so. Leaving this code though, since -# it's always been here ... - -# MS-DOS and MS-Windows define $COMSPEC or $ComSpec and use `;' to separate -# directories in path lists whereas Unix uses `:'. Make an exception for -# Cygwin, which pretends to be UNIX. -# Create a variable that holds the right character to be used by the scripts. -DOSISH=no -case `uname -s` in - CYGWIN*|Cygwin*|cygwin*) ;; - *) if test -n "$COMSPEC" || test -n "$ComSpec"; then DOSISH=yes; fi -esac -if test "$DOSISH" = "no"; then SEP=':'; else SEP=';';fi - -# Add the location of the script to the PATH if necessary. This must -# be done before kpsewhich can be called, and thus cannot be put into -# mktex.opt. -dirname=`echo $0 | sed 's%/*[^/][^/]*$%%'` -case $dirname in - "") # Do nothing - ;; - /* | [A-z]:/*) # Absolute name - PATH="$dirname$SEP$PATH" - export PATH ;; - *) # Relative name - PATH="`pwd`/$dirname$SEP$PATH" - export PATH ;; -esac - -if tty -s; then verbose=true; else verbose=false; fi -dry_run=false -trees= - -# initialize treefile by either mktemp or some random name -# code taken from pdfjam and adjusted -{ - treefile=` - (umask 077 && mktemp "${TMPDIR-/tmp}/mktexlsrtrees.XXXXXXXXXX") 2>/dev/null - ` && test -n "$treefile" && test -f "$treefile" -} || { - ## We'll use awk to make random number, for portability - random=`awk 'END { srand(); printf ("%d\n", rand()*1000000); }' /dev/null` - treefile="${TMPDIR-/tmp}/mktexlsrtrees$$.$random" -} || exit $? - -trap 'cd /; rm -f $treefile; test -z "$db_dir_tmp" || rm -rf "$db_dir_tmp"; - exit' 0 1 2 3 7 13 15 - -# A copy of some stuff from mktex.opt, so we can run in the presence of -# terminally damaged ls-R files. -while test $# -gt 0; do - if test "x$1" = x--help || test "x$1" = x-help; then - echo "$usage" - exit 0 - elif test "x$1" = x--version || test "x$1" = x-version; then - echo "`basename $0` $version" - kpsewhich --version - exit 0 - elif test "x$1" = x--verbose || test "x$1" = x-verbose; then - verbose=true - elif test "x$1" = x--dry-run || test "x$1" = x-n; then - dry_run=true - elif test "x$1" = x--quiet || test "x$1" = x--silent \ - || test "x$1" = x-quiet || test "x$1" = x-silent ; then - verbose=false - elif test "x$1" = x--; then - : - elif echo "x$1" | grep '^x-' >/dev/null; then - echo "$progname: unknown option \`$1', try --help if you need it." >&2 - exit 1 - else - if test ! -d "$1"; then - echo "$progname: $1: not a directory, skipping." >&2 - shift - continue - fi - # By saving the argument in a file, we can later get it back while - # supporting spaces in the name. This still doesn't support - # newlines in the directory names, but nobody ever complains about - # that, and it seems much too much trouble to use \0 terminators. - (umask 077 - if echo "$1" >>"$treefile"; then :; else - echo "$progname: $treefile: could not append to arg file, goodbye." >&2 - exit 1 - fi - ) - fi - shift -done - -# mktexupd and mktexlsr make sure they're coordinated via this. A copy -# is found mktex.opt. -ls_R_magic='% ls-R -- filename database for kpathsea; do not change this line.' -# The old string, which should continue to work. -old_ls_R_magic='% ls-R -- maintained by MakeTeXls-R; do not change this line.' - -{ - # Get list of directories from the explicit arguments (now saved in - # $treefile), or $TEXMFDBS if no explicit args. Eliminate duplicates. - saveIFS=$IFS # break only at newline - IFS=' -' - if test -s "$treefile"; then - set x `sort "$treefile" | uniq` - else - set x `kpsewhich --show-path=ls-R | tr : ' -' | sort | uniq` - fi - IFS=$saveIFS - shift -} - -for TEXMFLS_R in "$@"; do - # Prepend cwd if the directory was relative. - case "$TEXMFLS_R" in - "") continue ;; # Strictly speaking, it is an error if this case is taken. - /* | [A-z]:/*) ;; - *) TEXMFLS_R="`pwd`/$TEXMFLS_R" - esac - # Allow for either ls-R and ls-r to exist. But create ls-R if we're - # working from scratch. - if test -f "$TEXMFLS_R/ls-R"; then - db_file="$TEXMFLS_R/ls-R" - elif test -f "$TEXMFLS_R/ls-r"; then - db_file="$TEXMFLS_R/ls-r" - else - db_file="$TEXMFLS_R/ls-R" - fi - # Follow a possible symlink to get the right filesystem. - # The '|| true' construct prevents an sh -e aborting. - db_readlink=`kpsereadlink "$TEXMFLS_R/ls-R" 2>/dev/null` || true - case "$db_readlink" in - "") ;; - /* | [A-z]:/*) db_file="$db_readlink" ;; - *) db_file="$TEXMFLS_R/$db_readlink" - esac - db_dir=`echo "$db_file" | sed 's%/[^/][^/]*$%%'` # can't rely on dirname - - # want to be silent if the directory doesn't exist, since the ls-R - # path ordinarily contains many nonexistent directories. - test -d "$db_dir" || continue - test -w "$db_dir" || { echo "$progname: $db_dir: directory not writable. Skipping..." >&2; continue; } - - if test ! -f "$db_file"; then - cp /dev/null "$db_file" - # Use same permissions as parent directory, minus x,s, or t bits. - chmod `kpsestat -xst "$db_dir"` "$db_file" - elif test -s "$db_file" \ - && test "x`sed '1s/
$//;1q' \"$db_file\"`" != "x$ls_R_magic" \ - && test "x`sed '1s/
$//;1q' \"$db_file\"`" != "x$old_ls_R_magic"; then - echo "$progname: $db_file: no magic string, skipping..." >&2 - continue - fi - - # Skip if we cannot write the file: - kpseaccess -w "$db_file" || { echo "$progname: $db_file: no write permission, skipping..." >&2; continue; } - - db_dir_tmp="$db_dir/lsR$$.tmp" - (umask 077 && mkdir "$db_dir_tmp" ) \ - || { echo "$progname: $db_dir_tmp: could not create directory, skipping..." >&2; continue; } - db_file_tmp="$db_dir_tmp/lsR$$.tmp" - rm -f "$db_file_tmp" - - $verbose && echo "$progname: Updating $db_file... " - $dry_run && continue - - echo "$ls_R_magic" >"$db_file_tmp" - - # The main task. We put ./: in the output, so top-level files can be - # found via ls-R. Probably irrelevant in practice. The sed command - # inserts the leading ./ for directory names, and removes ., .., and - # version control entries from the list. Also omit contents of any - # the version directories; sed apparently requires that we do that - # operation in a separate invocation. We do not try to support colons - # in directory names. - # - echo "./:" >>"$db_file_tmp" - vc_dirs='\.\(bzr\|git\|hg\|svn\)\|_darcs' - (cd "$TEXMFLS_R" && \ls -LRa 2>/dev/null) \ - | sed -e '/^$/{n;s%^\./%%;s%^%./%;}; /^\.$/d; /^\.\.$/d; /^'$vc_dirs'$/d;' \ - -e '/^[\.\/]*lsR[0-9]*\.tmp:*$/d' \ - | sed -e /$vc_dirs'.*:$/,/^$/d' \ - >>"$db_file_tmp" - - # To be really safe, a loop. - until PERMS=`kpsestat = "$db_file"`; do sleep 1; done - chmod $PERMS "$db_file_tmp" - rm -f "$db_file" - mv "$db_file_tmp" "$db_file" - rm -rf "$db_dir_tmp" -done - -$verbose && echo "$progname: Done." -exit 0 +../../texmf-dist/scripts/texlive/mktexlsr
\ No newline at end of file diff --git a/Master/bin/i386-freebsd/mktexmf b/Master/bin/i386-freebsd/mktexmf index bb868c12a8d..302c00f763e 100755..120000 --- a/Master/bin/i386-freebsd/mktexmf +++ b/Master/bin/i386-freebsd/mktexmf @@ -1,151 +1 @@ -#!/bin/sh -# original mktexmf -- make a new MF file, because one wasn't found. -# -# (If you change or delete the word `original' on the previous line, -# installation won't write this script over yours.) -# -# Originally written by Thomas Esser. -# Public domain. - -version='$Id: mktexmf 34656 2014-07-18 23:38:50Z karl $' - -# preferentially use subprograms from our own directory. -mydir=`echo "$0" | sed 's,/[^/]*$,,'` -mydir=`cd "$mydir" && pwd` -PATH="$mydir:$PATH"; export PATH - -usage="Usage: $0 FONT. - -Makes the Metafont source file for FONT, if possible. For example, -\`ecr12' or \`cmr11'. - -Report bugs to: tex-k@tug.org -TeX Live home page: <http://tug.org/texlive/> -" - -# Common code for all scripts. -: ${MT_TEXMFMAIN=`kpsewhich --expand-path='$TEXMFMAIN'`} -: ${MT_MKTEX_OPT=`kpsewhich --format='web2c files' mktex.opt`} -test -n "$MT_MKTEX_OPT" || MT_MKTEX_OPT="$MT_TEXMFMAIN/web2c/mktex.opt" -if test ! -f "$MT_MKTEX_OPT"; then - echo "$progname: Cannot find mktex.opt; check your installation." >&2 - exit 1 -fi - -. "$MT_MKTEX_OPT" - -( -# See comments in mktexpk. -name="`echo $1 | sed 's%.*/%%; s%\.mf$%%'`" -rootname=`echo "$name" | sed 's/[0-9]*$//'` -pointsize=`echo "$name" | sed "s/^$rootname//"` - -sauterroot=`kpsewhich b-$rootname.mf 2>/dev/null` -if test -n "$sauterroot"; then - rootfile=$sauterroot - rootname=b-$rootname -else - case $name in - # csso12[0-5][0-9] from CJK package; unsupported by mktexmf - csso12[0-5][0-9]) - rootfile=;; - *) - case $rootname in - cs*|lcsss*|icscsc*|icstt*|ilcsss*) - rootfile=`kpsewhich cscode.mf`;; - wn[bcdfirstuv]*|rx[bcdfiorstuvx][bcfhilmostx]|l[abcdhl][bcdfiorstuvx]*) - lhprefix=`echo "$name" | sed 's/^\(..\).*/\1/'` - rootfile=`kpsewhich ${lhprefix}codes.mf 2>/dev/null`;; - *) - rootfile=`kpsewhich $rootname.mf 2>/dev/null`;; - esac;; - esac -fi -{ test -z "$rootfile" || test ! -f "$rootfile"; } && exit 1 - -#if test -z "$MT_MFNAME"; then -OIFS=$IFS; IFS=$SEP -set x `"$MT_MKTEXNAM" $name`; shift -IFS=$OIFS -MT_MFNAME="$3" -#fi - -destdir=`echo "$MT_MFNAME" | sed 's%/[^/][^/]*$%%'` -test -d "$destdir" || "$MT_MKTEXDIR" "$destdir" || exit 1 -cd "$destdir" || exit 1 - -case "$pointsize" in - "") echo "$progname: no pointsize."; exit 1;; - 11) realsize=10.95;; # \magstephalf - 14) realsize=14.4;; # \magstep2 - 17) realsize=17.28;; # \magstep3 - 20) realsize=20.74;; # \magstep4 - 25) realsize=24.88;; # \magstep5 - 30) realsize=29.86;; # \magstep6 - 36) realsize=35.83;; # \magstep7 - # The new convention is to have three or four letters for the - # font name and four digits for the pointsize. The number is - # pointsize * 100. We effectively divide by 100 by ignoring the - # last two digits. - ????|?????) realsize=`echo "$pointsize" | sed 's/\(..\)$/.\1/'`;; - *) realsize="$pointsize";; -esac - -mfname="$name.mf" -if test -r "$mfname"; then - echo "$progname: $destdir/$mfname already exists." - echo "$destdir/$mfname" >$STDOUT - "$MT_MKTEXUPD" "$destdir" "$mfname" - exit 0 -fi - -case "$name" in - ec*|tc*) - cat > "mf$$.tmp" <<END -if unknown exbase: input exbase fi; -gensize:=$realsize; -generate $rootname; -END - ;; - dc*) - cat > "mf$$.tmp" <<END -if unknown dxbase: input dxbase fi; -gensize:=$realsize; -generate $rootname; -END - ;; - cs*|lcsss*|icscsc*|icstt*|ilcsss*) - cat > "mf$$.tmp" <<END -input cscode -use_driver; -END - ;; - wn[bcdfirstuv]*|rx[bcdfiorstuvx][bcfhilmostx]*|l[abcdhl][bcdfiorstuvx]*) - cat > "mf$$.tmp" <<END -input fikparm; -END - ;; - g[lmorst][bijmtwx][cilnoru]*) - # A small superset of the names of the cbgreek fonts. - cat > "mf$$.tmp" <<END -% generated by mktexmf -input cbgreek; -END - ;; - *) - cat > "mf$$.tmp" <<END -design_size := $realsize; -input $rootname; -END - ;; -esac - -chmod `kpsestat -xst,go-w .` "mf$$.tmp" -rm -f "$mfname" -mv "mf$$.tmp" "$mfname" - -echo "$destdir/$mfname" >$STDOUT -echo "$progname: $destdir/$mfname: successfully generated." >&2 -"$MT_MKTEXUPD" "$destdir" "$mfname" -exit 0 -) 1>&2 </dev/null +../../texmf-dist/scripts/texlive/mktexmf
\ No newline at end of file diff --git a/Master/bin/i386-freebsd/mktexpk b/Master/bin/i386-freebsd/mktexpk index 2672dc7f78c..a0d6db0121b 100755..120000 --- a/Master/bin/i386-freebsd/mktexpk +++ b/Master/bin/i386-freebsd/mktexpk @@ -1,284 +1 @@ -#!/bin/sh -# original mktexpk -- make a new PK font, because one wasn't found. -# -# (If you change or delete the word `original' on the previous line, -# installation won't write this script over yours.) -# -# Originally written by Thomas Esser, Karl Berry, and Olaf Weber. -# Public domain. - -version='$Id: mktexpk 34656 2014-07-18 23:38:50Z karl $' -progname=`echo $0 | sed 's%.*/%%'` - -# preferentially use subprograms from our own directory. -mydir=`echo "$0" | sed 's,/[^/]*$,,'` -mydir=`cd "$mydir" && pwd` -PATH="$mydir:$PATH"; export PATH - -usage="Usage: $progname [OPTIONS] NAME [REDIRECT], - Create a PK font. - ---dpi DPI use resolution DPI. ---bdpi BDPI use base resolution BDPI. ---mag MAG use magnificiation MAG. ---mfmode MODE use MODE as the METAFONT mode. ---destdir DESTDIR write fonts in DESTDIR. - -Try to create a bitmap PK file for NAME at resolution DPI, with an -assumed device base resolution of BDPI, and a Metafont \`mag' of -MAG. Use MODE for the METAFONT mode. Use DESTDIR for the root of where -to install into, either the absolute directory name to use (if it starts -with a /) or relative to the default DESTDIR (if not). REDIRECT, if -supplied, is a string of the form '>&n', where n is the number of the -file descriptor which is to receive, instead of stdout, the name of the -newly created pk file. - -If you expected the font to be available as an outline, and thus this -script does not work and should not have been called, most likely the -font's .tfm name is missing from the relevant map file (e.g., -psfonts.map for dvips, pdftex.map for pdftex). These map files are -typically maintained using updmap; q.v. - -For step-by-step instructions on making new fonts known to TeX, see -http://tug.org/fonts/fontinstall.html. - -Report bugs to: tex-k@tug.org -TeX Live home page: <http://tug.org/texlive/> -" - -# Handle non-positional options, except for --version/--help -while test $# -gt 0; do - case "$1" in - --destdir) shift; DEST="$1"; shift ;; - --destdir=*) DEST=`echo "$1" | sed 's/--destdir=//'`; shift ;; - --dpi) shift; DPI="$1"; shift ;; - --dpi=*) DPI=`echo "$1" | sed 's/--dpi=//'`; shift ;; - --bdpi) shift; BDPI="$1"; shift ;; - --bdpi=*) BDPI=`echo "$1" | sed 's/--bdpi=//'`; shift ;; - --mfmode) shift; test "x$1" != "x/" && MODE="$1"; shift ;; - --mfmode=*) test "x$1" != "x--mfmode/" \ - && MODE=`echo "$1" | sed 's/--mfmode=//'`; shift ;; - --mag) shift; MAG="$1"; shift;; - --mag=*) MAG=`echo "$1" | sed '/s--mag=//'`; shift;; - --version|-version) break ;; - --help|-help) break ;; - *) break ;; - esac -done - -if test "x$2" != x; then - tail="`echo \"x$2\" | sed 's/^x>&//' | grep '^[0-9]*$'`" - if test -z "$tail"; then - echo "$progname: argument '$2' ignored - bad file number" >&2 - elif test "$tail" != 1; then - eval 'exec 1>&$tail' - fi -fi - -mt_max_args=2 - -# Common code for all scripts. -: ${MT_TEXMFMAIN=`kpsewhich --expand-path='$TEXMFMAIN'`} -: ${MT_MKTEX_OPT=`kpsewhich --format='web2c files' mktex.opt`} -test -n "$MT_MKTEX_OPT" || MT_MKTEX_OPT="$MT_TEXMFMAIN/web2c/mktex.opt" -if test ! -f "$MT_MKTEX_OPT"; then - echo "$progname: Cannot find mktex.opt; check your installation." >&2 - exit 1 -fi - -. "$MT_MKTEX_OPT" - -# Where do potential driver files belong? -case "$MT_FEATURES" in - *nomfdrivers*) - : ${MT_MFDESTDIR=`pwd`} - export MT_MFDESTDIR;; -esac - -# Since we want to pass the generated filename and only that filename -# back to the caller on standard output, we do some redirections so -# regular echo's will end up on stderr, and do an echo >$STDOUT at the end. -# Then the contents of $STDOUT will be echoed to stdout by a trap. - -# start of redirection stdout -> stderr, stdin <- /dev/null -( - -NAME=$1 - -if kpsewhich $NAME.mf >/dev/null 2>&1 || mktexmf $NAME >/dev/null 2>&1; then - # determine the progname of metafont to use; prefer mf-nowin. - if (mf-nowin --version) >/dev/null 2>&1; then - MF="mf-nowin -progname=mf" - else - MF=mf - fi - - # Check that $BDPI and $MODE are consistent; if not, ignore the mode and - # hope we can correctly guess it from bdpi. (People like to specify the - # resolution on the command line, not the mode so much.) - if test -n "$MODE"; then - mf_bdpi=`$MF \ -'\mode:='$MODE';mode_setup;message"BDPI= "&decimal round pixels_per_inch;end.'\ - </dev/null \ - | awk '/DPI=/ {print $2}'` - if test "x$mf_bdpi" != x$BDPI; then - echo "$progname: Mismatched mode $MODE and resolution $BDPI; ignoring mode." >&2 - MODE= - fi - fi - - # If an explicit mode is not supplied, try to guess. You can get a - # list of extant modes from ftp://ftp.tug.org/tex/modes.mf. - if test -z "$MODE" || test "x$MODE" = xdefault; then - case "$BDPI" in - 85) MODE=sun;; - 100) MODE=nextscrn;; - 180) MODE=toshiba;; - 300) MODE=cx;; - 360) MODE=epstylus;; - 400) MODE=nexthi;; - 600) MODE=ljfour;; - 720) MODE=epscszz;; - 1200) MODE=ultre;; - 1270) MODE=linoone;; - 8000) MODE=dpdfezzz;; - *) echo "$progname: Can't guess mode for $BDPI dpi devices." >&2 - echo "$progname: Use a config file or option to specify the mode; see:" >&2 - echo "$progname: http://tug.org/texinfohtml/kpathsea.html#Unable-to-generate-fonts" >&2 - exit 1 - esac - fi - - # Run Metafont. Always use plain Metafont, since reading cmbase.mf - # does not noticeably slow things down. - cmd="$MF \mode:=$MODE; mag:=$MAG; nonstopmode; input $NAME" -else - MODE=modeless - # ps_to_pk is set in mktex.opt - case $ps_to_pk in - gsftopk) - if $ps_to_pk -t "$NAME"; then - cmd="$ps_to_pk $NAME $DPI" - fi;; - ps2pk) - # grep for the font in $PSMAPFILE. These are base font names, such as - # rpplr (the original) or pplr0 (an interim step) or pplr8r (current). - : ${PSMAPFILE=`kpsewhich --format=map psfonts.map ps2pk.map`} - pattern="^$NAME"'([ ]|$)' - psline=`egrep "$pattern" $PSMAPFILE | tail -1` - if test -n "$psline"; then - set x `echo "$psline" | sed 's%[<["]%%g'` - shift; shift; shift; - encoding=; psname=; slant=; extend= - while test ! -z "$1"; do - case "$1" in - *.enc) encoding="-e $1";; - *.pf[ab]) psname="$1";; - *SlantFont) slant="-S $lastopt";; - *ExtendFont) extend="-E $lastopt";; - esac - lastopt="$1" - shift - done - # Guessing the name of the type1 font file as fallback: - ANAME=`echo $NAME | sed 's/8r$/8a/'` - for i in $NAME.pfa $NAME.pfb $ANAME.pfa $ANAME.pfb; do - if kpsewhich $i >/dev/null 2>&1; then - psname=$i - break - fi - done - - if [ -n "$psname" ]; then - cmd="ps2pk -v -X$DPI -R$BDPI $slant $extend $encoding $psname $NAME.${DPI}pk" - else - if gsftopk -t "$NAME"; then - echo "$progname: cannot find $NAME.pfa or $NAME.pfb. Trying gsftopk." >&2 - cmd="gsftopk $NAME $DPI" - fi - fi - fi;; - esac - - # unsupported by $ps_to_pk, try other conversions: - if test -z "$cmd"; then - if (ttf2pk -t -q $NAME) >/dev/null 2>&1; then - cmd="ttf2pk -q $NAME $DPI" - elif (hbf2gf -t -q $NAME) >/dev/null 2>&1; then - cmd="hbf2gf -q -p $NAME $DPI" - else - echo "$progname: don't know how to create bitmap font for $NAME." >&2 - echo "$progname: perhaps $NAME is missing from the map file." >&2 - exit 1 - fi - fi -fi - -OIFS=$IFS; IFS=$SEP -set x `"$MT_MKTEXNAM" $NAME $DPI $MODE $DEST`; shift -IFS=$OIFS - -PKDEST="$1" -PKDESTDIR=`echo "$PKDEST" | sed 's%/[^/][^/]*$%%'` # can't rely on dirname -PKNAME=`basename "$PKDEST"` -GFNAME=$NAME.${DPI}gf - -if test -r "$PKDESTDIR/$PKNAME"; then - echo "$progname: $PKDESTDIR/$PKNAME already exists." >&2 - echo "$PKDESTDIR/$PKNAME" >$STDOUT - "$MT_MKTEXUPD" "$PKDESTDIR" $PKNAME - exit 0 -fi - -"$MT_MKTEXDIR" "$PKDESTDIR" -if test ! -d "$PKDESTDIR"; then - echo "$progname: $MT_MKTEXDIR $PKDESTDIR failed." >&2 - exit 1 -fi - -echo "$progname: Running $cmd" -$cmd </dev/null || { - # Don't abort if only "Strange path", "bad pos" or "angle(0,0)" - # errors occurr. - grep '^!' $NAME.log | sort >$$.errs 2>/dev/null - grep '^! Strange path' $$.errs >$$.strange 2>/dev/null - grep '^! bad pos.' $$.errs >$$.badpos 2>/dev/null - grep '^! angle(0,0) is taken as zero.' $$.errs >$$.angle 2>/dev/null - cat $$.badpos $$.strange $$.angle | sort > $$.errs_accept - if cmp $$.errs $$.errs_accept >/dev/null 2>&1; then - test -s $$.strange >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused strange path errors." >&2 - test -s $$.badpos >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused bad pos errors." >&2 - test -s $$.angle >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused angle(0,0) errors." >&2 - else - echo "$progname: \`$cmd' failed." >&2 - test -s $NAME.log && mv -f $NAME.log "$KPSE_DOT" - exit 1; - fi -} - -test -r $GFNAME && { gftopk ./$GFNAME $PKNAME || exit 1; } -test ! -f $PKNAME && test -f $NAME.${DPI}pk && mv $NAME.${DPI}pk $PKNAME -if test ! -s $PKNAME; then - echo "$progname: \`$cmd' failed to make $PKNAME." >&2 - exit 1 -fi - -# Install the PK file carefully, since others may be working simultaneously. -# Use cp when mv fails, since DOS will fail mv for deeply-nested directories. -mv $PKNAME "$PKDESTDIR/pk$$.tmp" 2>/dev/null \ - || cp $PKNAME "$PKDESTDIR/pk$$.tmp" || exit 1 -cd "$PKDESTDIR" || exit 1 -chmod `kpsestat -xst,go-w .` pk$$.tmp -test -r $PKNAME || mv pk$$.tmp $PKNAME || exit 1 - -# Update ls-R if necessary. -"$MT_MKTEXUPD" "$PKDESTDIR" $PKNAME - -# If this line (or an equivalent) is not present, dvipsk/xdvik/dviljk -# will think mktexpk failed. Any other output to stdout will also lose. -echo "$PKDESTDIR/$PKNAME" >$STDOUT -echo "$progname: $PKDESTDIR/$PKNAME: successfully generated." >&2 -) 1>&2 </dev/null +../../texmf-dist/scripts/texlive/mktexpk
\ No newline at end of file diff --git a/Master/bin/i386-freebsd/mktextfm b/Master/bin/i386-freebsd/mktextfm index 46e30a9c5dc..70ae3a438ce 100755..120000 --- a/Master/bin/i386-freebsd/mktextfm +++ b/Master/bin/i386-freebsd/mktextfm @@ -1,162 +1 @@ -#!/bin/sh -# original mktextfm -- make a new TFM file, because one wasn't found. -# -# (If you change or delete the word `original' on the previous line, -# installation won't write this script over yours.) -# -# Primarily written by Thomas Esser, Karl Berry, and Olaf Weber. -# Public domain. - -version='$Id: mktextfm 34656 2014-07-18 23:38:50Z karl $' -progname=`echo $0 | sed 's%.*/%%'` - -# preferentially use subprograms from our own directory. -mydir=`echo "$0" | sed 's,/[^/]*$,,'` -mydir=`cd "$mydir" && pwd` -PATH="$mydir:$PATH"; export PATH - -usage="Usage: $progname [--destdir DESTDIR] FONT. - -Makes a TFM file for FONT, if possible. Use DESTDIR for the root of where -to install into, either the absolute directory name to use (if it starts -with a /) or relative to the default DESTDIR (if not). - -Report bugs to: tex-k@tug.org -TeX Live home page: <http://tug.org/texlive/> -" - -# Handle non-positional options, except for --version/--help -while test $# -gt 0; do - case "$1" in - --destdir) shift; DEST="$1"; shift ;; - --destdir=*) DEST=`echo "$1" | sed 's/--destdir=//'`; shift ;; - --version|-version) break ;; - --help|-help) break ;; - *) break ;; - esac -done - -# Common code for all scripts. -: ${MT_TEXMFMAIN=`kpsewhich --expand-path='$TEXMFMAIN'`} -: ${MT_MKTEX_OPT=`kpsewhich --format='web2c files' mktex.opt`} -test -n "$MT_MKTEX_OPT" || MT_MKTEX_OPT="$MT_TEXMFMAIN/web2c/mktex.opt" -if test ! -f "$MT_MKTEX_OPT"; then - echo "$progname: Cannot find mktex.opt; check your installation." >&2 - exit 1 -fi - -. "$MT_MKTEX_OPT" - -# Where do potential mf driver files go? -case "$MT_FEATURES" in - *nomfdrivers*) - : ${MT_MFDESTDIR=`pwd`} - export MT_MFDESTDIR;; -esac - -# start of redirection stdout -> stderr, stdin <- /dev/null -( - -NAME=`basename "$1" .tfm` -MAG=1 # mag=0 fails with larm1000.mf -#DEST="$2" -DPI=$BDPI - -OIFS=$IFS; IFS=$SEP -set x `"$MT_MKTEXNAM" $NAME $DPI $MODE $DEST`; shift -IFS=$OIFS - -PKDEST="$1" -TFMDEST="$2" -PKDESTDIR=`echo "$PKDEST" | sed 's%/[^/][^/]*$%%'` # can't rely on dirname -TFMDESTDIR=`echo "$TFMDEST" | sed 's%/[^/][^/]*$%%'` -PKNAME=`basename "$PKDEST"` -TFMNAME=$NAME.tfm -GFNAME=$NAME.$DPI'gf' - -if test -r "$TFMDESTDIR/$TFMNAME"; then - echo "$progname: $TFMDESTDIR/$TFMNAME already exists." >&2 - echo "$TFMDESTDIR/$TFMNAME" >$STDOUT - "$MT_MKTEXUPD" "$TFMDESTDIR" $TFMNAME - exit -fi - -# Try to create the destdir first. Do not create fonts, if this fails. -"$MT_MKTEXDIR" "$TFMDESTDIR" -if test ! -d "$TFMDESTDIR"; then - echo "$progname: mktexdir $TFMDESTDIR failed." - exit 1 -fi - -# Check if this font is supported by hbf2gf else use metafont. -if (hbf2gf -q -t $NAME) >/dev/null 2>&1; then - cmd="hbf2gf -g $NAME $DPI" -else - # determine the progname of metafont to use; prefer mf-nowin. - if (mf-nowin --version) >/dev/null 2>&1; then - MF="mf-nowin -progname=mf" - else - MF=mf - fi - - cmd="$MF \mode:=$MODE; mag:=$MAG; nonstopmode; input $NAME" -fi - -echo "$progname: Running $cmd" -$cmd </dev/null || { - # Don't abort if only "Strange path", "bad pos" or "angle(0,0)" - # errors occurr. - grep '^!' $NAME.log | sort >$$.errs 2>/dev/null - grep '^! Strange path' $$.errs >$$.strange 2>/dev/null - grep '^! bad pos.' $$.errs >$$.badpos 2>/dev/null - grep '^! angle(0,0) is taken as zero.' $$.errs >$$.angle 2>/dev/null - cat $$.badpos $$.strange $$.angle | sort > $$.errs_accept - if cmp $$.errs $$.errs_accept >/dev/null 2>&1; then - test -s $$.strange >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused strange path errors." >&2 - test -s $$.badpos >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused bad pos errors." >&2 - test -s $$.angle >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused angle(0,0) errors." >&2 - else - echo "$progname: \`$cmd' failed." >&2 - test -s $NAME.log && mv -f $NAME.log "$KPSE_DOT" - exit 1; - fi -} - -# hbf2gf just produces a .pl file: -test -r ./$NAME.pl && pltotf ./$NAME.pl $TFMNAME -test -r $TFMNAME || { echo "$progname: \`$cmd' failed to make $TFMNAME."; exit 1; } - -# Install the TFM file carefully, since others may be working simultaneously. -# Use cp when mv fails, since DOS will fail mv for deeply-nested directories. -mv $TFMNAME "$TFMDESTDIR/tfm$$.tmp" 2>/dev/null \ - || cp $TFMNAME "$TFMDESTDIR/tfm$$.tmp" || exit 1 -cd "$TFMDESTDIR" || exit 1 -chmod `kpsestat -xst,go-w .` tfm$$.tmp -test -r $TFMNAME || mv tfm$$.tmp $TFMNAME || exit 1 - -# OK, success with the TFM. -"$MT_MKTEXUPD" "$TFMDESTDIR" $TFMNAME -echo "$TFMDESTDIR/$TFMNAME" >$STDOUT -echo "$progname: $TFMDESTDIR/$TFMNAME: successfully generated." >&2 - -# Since we probably made a GF(->PK) file, too, may as well install it if -# it's needed. -cd $TEMPDIR -if test -r $GFNAME && test ! -f "$PKDESTDIR/$PKNAME"; then - gftopk ./$GFNAME $PKNAME || exit 1 - "$MT_MKTEXDIR" "$PKDESTDIR" - mv $PKNAME "$PKDESTDIR/pk$$.tmp" 2>/dev/null \ - || cp $PKNAME "$PKDESTDIR/pk$$.tmp" || exit 1 - cd "$PKDESTDIR" || exit 1 - if test -f $PKNAME; then - rm -f pk$$.tmp - else - chmod `kpsestat -xst,go-w .` pk$$.tmp - mv pk$$.tmp $PKNAME - "$MT_MKTEXUPD" "$PKDESTDIR" $PKNAME - fi -fi -) 1>&2 </dev/null +../../texmf-dist/scripts/texlive/mktextfm
\ No newline at end of file diff --git a/Master/bin/i386-linux/mktexlsr b/Master/bin/i386-linux/mktexlsr index bd3eb50d6e4..a36378a2b9f 100755..120000 --- a/Master/bin/i386-linux/mktexlsr +++ b/Master/bin/i386-linux/mktexlsr @@ -1,236 +1 @@ -#!/bin/sh -# original mktexlsr -- create or rebuild ls-R. -# -# (If you change or delete the word `original' on the previous line, -# installation won't write this script over yours.) -# -# Suitable for calling from cron, as in: -# 0 * * * * cd /your/texmf/root && /usr/local/texlive/bin/mktexlsr -# -# Originally written as `texhash' by Thomas Esser, Okt., 1994. -# Public domain. - -version='$Id$' -progname=`echo $0 | sed 's%.*/%%'` - -usage="Usage: $progname [OPTION]... [DIR]... - -Rebuild ls-R filename databases used by TeX. If one or more arguments -DIRS are given, these are used as the directories in which to build -ls-R. Else all directories in the search path for ls-R files -(\$TEXMFDBS) are used. - -Options: - --dry-run do not actually update anything - --help display this help and exit - --quiet cancel --verbose - --silent same as --quiet - --verbose explain what is being done - --version output version information and exit - -If standard input is a terminal, --verbose is on by default. - -For more information, see the \`Filename database' section of -Kpathsea manual available at http://tug.org/kpathsea. - -Report bugs to: tex-k@tug.org -TeX Live home page: <http://tug.org/texlive/> -" - -# The simple PATH-prepending approach we take in other scripts doesn't -# handle DOS/Windows, but we don't use the shell scripts on Windows -# anyway, and does anyone want current TL on DOS or DJGPP? Maybe they -# can maintain their own changes if so. Leaving this code though, since -# it's always been here ... - -# MS-DOS and MS-Windows define $COMSPEC or $ComSpec and use `;' to separate -# directories in path lists whereas Unix uses `:'. Make an exception for -# Cygwin, which pretends to be UNIX. -# Create a variable that holds the right character to be used by the scripts. -DOSISH=no -case `uname -s` in - CYGWIN*|Cygwin*|cygwin*) ;; - *) if test -n "$COMSPEC" || test -n "$ComSpec"; then DOSISH=yes; fi -esac -if test "$DOSISH" = "no"; then SEP=':'; else SEP=';';fi - -# Add the location of the script to the PATH if necessary. This must -# be done before kpsewhich can be called, and thus cannot be put into -# mktex.opt. -dirname=`echo $0 | sed 's%/*[^/][^/]*$%%'` -case $dirname in - "") # Do nothing - ;; - /* | [A-z]:/*) # Absolute name - PATH="$dirname$SEP$PATH" - export PATH ;; - *) # Relative name - PATH="`pwd`/$dirname$SEP$PATH" - export PATH ;; -esac - -if tty -s; then verbose=true; else verbose=false; fi -dry_run=false -trees= - -# initialize treefile by either mktemp or some random name -# code taken from pdfjam and adjusted -{ - treefile=` - (umask 077 && mktemp "${TMPDIR-/tmp}/mktexlsrtrees.XXXXXXXXXX") 2>/dev/null - ` && test -n "$treefile" && test -f "$treefile" -} || { - ## We'll use awk to make random number, for portability - random=`awk 'END { srand(); printf ("%d\n", rand()*1000000); }' /dev/null` - treefile="${TMPDIR-/tmp}/mktexlsrtrees$$.$random" -} || exit $? - -trap 'cd /; rm -f $treefile; test -z "$db_dir_tmp" || rm -rf "$db_dir_tmp"; - exit' 0 1 2 3 7 13 15 - -# A copy of some stuff from mktex.opt, so we can run in the presence of -# terminally damaged ls-R files. -while test $# -gt 0; do - if test "x$1" = x--help || test "x$1" = x-help; then - echo "$usage" - exit 0 - elif test "x$1" = x--version || test "x$1" = x-version; then - echo "`basename $0` $version" - kpsewhich --version - exit 0 - elif test "x$1" = x--verbose || test "x$1" = x-verbose; then - verbose=true - elif test "x$1" = x--dry-run || test "x$1" = x-n; then - dry_run=true - elif test "x$1" = x--quiet || test "x$1" = x--silent \ - || test "x$1" = x-quiet || test "x$1" = x-silent ; then - verbose=false - elif test "x$1" = x--; then - : - elif echo "x$1" | grep '^x-' >/dev/null; then - echo "$progname: unknown option \`$1', try --help if you need it." >&2 - exit 1 - else - if test ! -d "$1"; then - echo "$progname: $1: not a directory, skipping." >&2 - shift - continue - fi - # By saving the argument in a file, we can later get it back while - # supporting spaces in the name. This still doesn't support - # newlines in the directory names, but nobody ever complains about - # that, and it seems much too much trouble to use \0 terminators. - (umask 077 - if echo "$1" >>"$treefile"; then :; else - echo "$progname: $treefile: could not append to arg file, goodbye." >&2 - exit 1 - fi - ) - fi - shift -done - -# mktexupd and mktexlsr make sure they're coordinated via this. A copy -# is found mktex.opt. -ls_R_magic='% ls-R -- filename database for kpathsea; do not change this line.' -# The old string, which should continue to work. -old_ls_R_magic='% ls-R -- maintained by MakeTeXls-R; do not change this line.' - -{ - # Get list of directories from the explicit arguments (now saved in - # $treefile), or $TEXMFDBS if no explicit args. Eliminate duplicates. - saveIFS=$IFS # break only at newline - IFS=' -' - if test -s "$treefile"; then - set x `sort "$treefile" | uniq` - else - set x `kpsewhich --show-path=ls-R | tr : ' -' | sort | uniq` - fi - IFS=$saveIFS - shift -} - -for TEXMFLS_R in "$@"; do - # Prepend cwd if the directory was relative. - case "$TEXMFLS_R" in - "") continue ;; # Strictly speaking, it is an error if this case is taken. - /* | [A-z]:/*) ;; - *) TEXMFLS_R="`pwd`/$TEXMFLS_R" - esac - # Allow for either ls-R and ls-r to exist. But create ls-R if we're - # working from scratch. - if test -f "$TEXMFLS_R/ls-R"; then - db_file="$TEXMFLS_R/ls-R" - elif test -f "$TEXMFLS_R/ls-r"; then - db_file="$TEXMFLS_R/ls-r" - else - db_file="$TEXMFLS_R/ls-R" - fi - # Follow a possible symlink to get the right filesystem. - # The '|| true' construct prevents an sh -e aborting. - db_readlink=`kpsereadlink "$TEXMFLS_R/ls-R" 2>/dev/null` || true - case "$db_readlink" in - "") ;; - /* | [A-z]:/*) db_file="$db_readlink" ;; - *) db_file="$TEXMFLS_R/$db_readlink" - esac - db_dir=`echo "$db_file" | sed 's%/[^/][^/]*$%%'` # can't rely on dirname - - # want to be silent if the directory doesn't exist, since the ls-R - # path ordinarily contains many nonexistent directories. - test -d "$db_dir" || continue - test -w "$db_dir" || { echo "$progname: $db_dir: directory not writable. Skipping..." >&2; continue; } - - if test ! -f "$db_file"; then - cp /dev/null "$db_file" - # Use same permissions as parent directory, minus x,s, or t bits. - chmod `kpsestat -xst "$db_dir"` "$db_file" - elif test -s "$db_file" \ - && test "x`sed '1s/
$//;1q' \"$db_file\"`" != "x$ls_R_magic" \ - && test "x`sed '1s/
$//;1q' \"$db_file\"`" != "x$old_ls_R_magic"; then - echo "$progname: $db_file: no magic string, skipping..." >&2 - continue - fi - - # Skip if we cannot write the file: - kpseaccess -w "$db_file" || { echo "$progname: $db_file: no write permission, skipping..." >&2; continue; } - - db_dir_tmp="$db_dir/lsR$$.tmp" - (umask 077 && mkdir "$db_dir_tmp" ) \ - || { echo "$progname: $db_dir_tmp: could not create directory, skipping..." >&2; continue; } - db_file_tmp="$db_dir_tmp/lsR$$.tmp" - rm -f "$db_file_tmp" - - $verbose && echo "$progname: Updating $db_file... " - $dry_run && continue - - echo "$ls_R_magic" >"$db_file_tmp" - - # The main task. We put ./: in the output, so top-level files can be - # found via ls-R. Probably irrelevant in practice. The sed command - # inserts the leading ./ for directory names, and removes ., .., and - # version control entries from the list. Also omit contents of any - # the version directories; sed apparently requires that we do that - # operation in a separate invocation. We do not try to support colons - # in directory names. - # - echo "./:" >>"$db_file_tmp" - vc_dirs='\.\(bzr\|git\|hg\|svn\)\|_darcs' - (cd "$TEXMFLS_R" && \ls -LRa 2>/dev/null) \ - | sed -e '/^$/{n;s%^\./%%;s%^%./%;}; /^\.$/d; /^\.\.$/d; /^'$vc_dirs'$/d;' \ - -e '/^[\.\/]*lsR[0-9]*\.tmp:*$/d' \ - | sed -e /$vc_dirs'.*:$/,/^$/d' \ - >>"$db_file_tmp" - - # To be really safe, a loop. - until PERMS=`kpsestat = "$db_file"`; do sleep 1; done - chmod $PERMS "$db_file_tmp" - rm -f "$db_file" - mv "$db_file_tmp" "$db_file" - rm -rf "$db_dir_tmp" -done - -$verbose && echo "$progname: Done." -exit 0 +../../texmf-dist/scripts/texlive/mktexlsr
\ No newline at end of file diff --git a/Master/bin/i386-linux/mktexmf b/Master/bin/i386-linux/mktexmf index f6b8991e8d1..302c00f763e 100755..120000 --- a/Master/bin/i386-linux/mktexmf +++ b/Master/bin/i386-linux/mktexmf @@ -1,151 +1 @@ -#!/bin/sh -# original mktexmf -- make a new MF file, because one wasn't found. -# -# (If you change or delete the word `original' on the previous line, -# installation won't write this script over yours.) -# -# Originally written by Thomas Esser. -# Public domain. - -version='$Id$' - -# preferentially use subprograms from our own directory. -mydir=`echo "$0" | sed 's,/[^/]*$,,'` -mydir=`cd "$mydir" && pwd` -PATH="$mydir:$PATH"; export PATH - -usage="Usage: $0 FONT. - -Makes the Metafont source file for FONT, if possible. For example, -\`ecr12' or \`cmr11'. - -Report bugs to: tex-k@tug.org -TeX Live home page: <http://tug.org/texlive/> -" - -# Common code for all scripts. -: ${MT_TEXMFMAIN=`kpsewhich --expand-path='$TEXMFMAIN'`} -: ${MT_MKTEX_OPT=`kpsewhich --format='web2c files' mktex.opt`} -test -n "$MT_MKTEX_OPT" || MT_MKTEX_OPT="$MT_TEXMFMAIN/web2c/mktex.opt" -if test ! -f "$MT_MKTEX_OPT"; then - echo "$progname: Cannot find mktex.opt; check your installation." >&2 - exit 1 -fi - -. "$MT_MKTEX_OPT" - -( -# See comments in mktexpk. -name="`echo $1 | sed 's%.*/%%; s%\.mf$%%'`" -rootname=`echo "$name" | sed 's/[0-9]*$//'` -pointsize=`echo "$name" | sed "s/^$rootname//"` - -sauterroot=`kpsewhich b-$rootname.mf 2>/dev/null` -if test -n "$sauterroot"; then - rootfile=$sauterroot - rootname=b-$rootname -else - case $name in - # csso12[0-5][0-9] from CJK package; unsupported by mktexmf - csso12[0-5][0-9]) - rootfile=;; - *) - case $rootname in - cs*|lcsss*|icscsc*|icstt*|ilcsss*) - rootfile=`kpsewhich cscode.mf`;; - wn[bcdfirstuv]*|rx[bcdfiorstuvx][bcfhilmostx]|l[abcdhl][bcdfiorstuvx]*) - lhprefix=`echo "$name" | sed 's/^\(..\).*/\1/'` - rootfile=`kpsewhich ${lhprefix}codes.mf 2>/dev/null`;; - *) - rootfile=`kpsewhich $rootname.mf 2>/dev/null`;; - esac;; - esac -fi -{ test -z "$rootfile" || test ! -f "$rootfile"; } && exit 1 - -#if test -z "$MT_MFNAME"; then -OIFS=$IFS; IFS=$SEP -set x `"$MT_MKTEXNAM" $name`; shift -IFS=$OIFS -MT_MFNAME="$3" -#fi - -destdir=`echo "$MT_MFNAME" | sed 's%/[^/][^/]*$%%'` -test -d "$destdir" || "$MT_MKTEXDIR" "$destdir" || exit 1 -cd "$destdir" || exit 1 - -case "$pointsize" in - "") echo "$progname: no pointsize."; exit 1;; - 11) realsize=10.95;; # \magstephalf - 14) realsize=14.4;; # \magstep2 - 17) realsize=17.28;; # \magstep3 - 20) realsize=20.74;; # \magstep4 - 25) realsize=24.88;; # \magstep5 - 30) realsize=29.86;; # \magstep6 - 36) realsize=35.83;; # \magstep7 - # The new convention is to have three or four letters for the - # font name and four digits for the pointsize. The number is - # pointsize * 100. We effectively divide by 100 by ignoring the - # last two digits. - ????|?????) realsize=`echo "$pointsize" | sed 's/\(..\)$/.\1/'`;; - *) realsize="$pointsize";; -esac - -mfname="$name.mf" -if test -r "$mfname"; then - echo "$progname: $destdir/$mfname already exists." - echo "$destdir/$mfname" >$STDOUT - "$MT_MKTEXUPD" "$destdir" "$mfname" - exit 0 -fi - -case "$name" in - ec*|tc*) - cat > "mf$$.tmp" <<END -if unknown exbase: input exbase fi; -gensize:=$realsize; -generate $rootname; -END - ;; - dc*) - cat > "mf$$.tmp" <<END -if unknown dxbase: input dxbase fi; -gensize:=$realsize; -generate $rootname; -END - ;; - cs*|lcsss*|icscsc*|icstt*|ilcsss*) - cat > "mf$$.tmp" <<END -input cscode -use_driver; -END - ;; - wn[bcdfirstuv]*|rx[bcdfiorstuvx][bcfhilmostx]*|l[abcdhl][bcdfiorstuvx]*) - cat > "mf$$.tmp" <<END -input fikparm; -END - ;; - g[lmorst][bijmtwx][cilnoru]*) - # A small superset of the names of the cbgreek fonts. - cat > "mf$$.tmp" <<END -% generated by mktexmf -input cbgreek; -END - ;; - *) - cat > "mf$$.tmp" <<END -design_size := $realsize; -input $rootname; -END - ;; -esac - -chmod `kpsestat -xst,go-w .` "mf$$.tmp" -rm -f "$mfname" -mv "mf$$.tmp" "$mfname" - -echo "$destdir/$mfname" >$STDOUT -echo "$progname: $destdir/$mfname: successfully generated." >&2 -"$MT_MKTEXUPD" "$destdir" "$mfname" -exit 0 -) 1>&2 </dev/null +../../texmf-dist/scripts/texlive/mktexmf
\ No newline at end of file diff --git a/Master/bin/i386-linux/mktexpk b/Master/bin/i386-linux/mktexpk index 4eaafb1d94e..a0d6db0121b 100755..120000 --- a/Master/bin/i386-linux/mktexpk +++ b/Master/bin/i386-linux/mktexpk @@ -1,284 +1 @@ -#!/bin/sh -# original mktexpk -- make a new PK font, because one wasn't found. -# -# (If you change or delete the word `original' on the previous line, -# installation won't write this script over yours.) -# -# Originally written by Thomas Esser, Karl Berry, and Olaf Weber. -# Public domain. - -version='$Id$' -progname=`echo $0 | sed 's%.*/%%'` - -# preferentially use subprograms from our own directory. -mydir=`echo "$0" | sed 's,/[^/]*$,,'` -mydir=`cd "$mydir" && pwd` -PATH="$mydir:$PATH"; export PATH - -usage="Usage: $progname [OPTIONS] NAME [REDIRECT], - Create a PK font. - ---dpi DPI use resolution DPI. ---bdpi BDPI use base resolution BDPI. ---mag MAG use magnificiation MAG. ---mfmode MODE use MODE as the METAFONT mode. ---destdir DESTDIR write fonts in DESTDIR. - -Try to create a bitmap PK file for NAME at resolution DPI, with an -assumed device base resolution of BDPI, and a Metafont \`mag' of -MAG. Use MODE for the METAFONT mode. Use DESTDIR for the root of where -to install into, either the absolute directory name to use (if it starts -with a /) or relative to the default DESTDIR (if not). REDIRECT, if -supplied, is a string of the form '>&n', where n is the number of the -file descriptor which is to receive, instead of stdout, the name of the -newly created pk file. - -If you expected the font to be available as an outline, and thus this -script does not work and should not have been called, most likely the -font's .tfm name is missing from the relevant map file (e.g., -psfonts.map for dvips, pdftex.map for pdftex). These map files are -typically maintained using updmap; q.v. - -For step-by-step instructions on making new fonts known to TeX, see -http://tug.org/fonts/fontinstall.html. - -Report bugs to: tex-k@tug.org -TeX Live home page: <http://tug.org/texlive/> -" - -# Handle non-positional options, except for --version/--help -while test $# -gt 0; do - case "$1" in - --destdir) shift; DEST="$1"; shift ;; - --destdir=*) DEST=`echo "$1" | sed 's/--destdir=//'`; shift ;; - --dpi) shift; DPI="$1"; shift ;; - --dpi=*) DPI=`echo "$1" | sed 's/--dpi=//'`; shift ;; - --bdpi) shift; BDPI="$1"; shift ;; - --bdpi=*) BDPI=`echo "$1" | sed 's/--bdpi=//'`; shift ;; - --mfmode) shift; test "x$1" != "x/" && MODE="$1"; shift ;; - --mfmode=*) test "x$1" != "x--mfmode/" \ - && MODE=`echo "$1" | sed 's/--mfmode=//'`; shift ;; - --mag) shift; MAG="$1"; shift;; - --mag=*) MAG=`echo "$1" | sed '/s--mag=//'`; shift;; - --version|-version) break ;; - --help|-help) break ;; - *) break ;; - esac -done - -if test "x$2" != x; then - tail="`echo \"x$2\" | sed 's/^x>&//' | grep '^[0-9]*$'`" - if test -z "$tail"; then - echo "$progname: argument '$2' ignored - bad file number" >&2 - elif test "$tail" != 1; then - eval 'exec 1>&$tail' - fi -fi - -mt_max_args=2 - -# Common code for all scripts. -: ${MT_TEXMFMAIN=`kpsewhich --expand-path='$TEXMFMAIN'`} -: ${MT_MKTEX_OPT=`kpsewhich --format='web2c files' mktex.opt`} -test -n "$MT_MKTEX_OPT" || MT_MKTEX_OPT="$MT_TEXMFMAIN/web2c/mktex.opt" -if test ! -f "$MT_MKTEX_OPT"; then - echo "$progname: Cannot find mktex.opt; check your installation." >&2 - exit 1 -fi - -. "$MT_MKTEX_OPT" - -# Where do potential driver files belong? -case "$MT_FEATURES" in - *nomfdrivers*) - : ${MT_MFDESTDIR=`pwd`} - export MT_MFDESTDIR;; -esac - -# Since we want to pass the generated filename and only that filename -# back to the caller on standard output, we do some redirections so -# regular echo's will end up on stderr, and do an echo >$STDOUT at the end. -# Then the contents of $STDOUT will be echoed to stdout by a trap. - -# start of redirection stdout -> stderr, stdin <- /dev/null -( - -NAME=$1 - -if kpsewhich $NAME.mf >/dev/null 2>&1 || mktexmf $NAME >/dev/null 2>&1; then - # determine the progname of metafont to use; prefer mf-nowin. - if (mf-nowin --version) >/dev/null 2>&1; then - MF="mf-nowin -progname=mf" - else - MF=mf - fi - - # Check that $BDPI and $MODE are consistent; if not, ignore the mode and - # hope we can correctly guess it from bdpi. (People like to specify the - # resolution on the command line, not the mode so much.) - if test -n "$MODE"; then - mf_bdpi=`$MF \ -'\mode:='$MODE';mode_setup;message"BDPI= "&decimal round pixels_per_inch;end.'\ - </dev/null \ - | awk '/DPI=/ {print $2}'` - if test "x$mf_bdpi" != x$BDPI; then - echo "$progname: Mismatched mode $MODE and resolution $BDPI; ignoring mode." >&2 - MODE= - fi - fi - - # If an explicit mode is not supplied, try to guess. You can get a - # list of extant modes from ftp://ftp.tug.org/tex/modes.mf. - if test -z "$MODE" || test "x$MODE" = xdefault; then - case "$BDPI" in - 85) MODE=sun;; - 100) MODE=nextscrn;; - 180) MODE=toshiba;; - 300) MODE=cx;; - 360) MODE=epstylus;; - 400) MODE=nexthi;; - 600) MODE=ljfour;; - 720) MODE=epscszz;; - 1200) MODE=ultre;; - 1270) MODE=linoone;; - 8000) MODE=dpdfezzz;; - *) echo "$progname: Can't guess mode for $BDPI dpi devices." >&2 - echo "$progname: Use a config file or option to specify the mode; see:" >&2 - echo "$progname: http://tug.org/texinfohtml/kpathsea.html#Unable-to-generate-fonts" >&2 - exit 1 - esac - fi - - # Run Metafont. Always use plain Metafont, since reading cmbase.mf - # does not noticeably slow things down. - cmd="$MF \mode:=$MODE; mag:=$MAG; nonstopmode; input $NAME" -else - MODE=modeless - # ps_to_pk is set in mktex.opt - case $ps_to_pk in - gsftopk) - if $ps_to_pk -t "$NAME"; then - cmd="$ps_to_pk $NAME $DPI" - fi;; - ps2pk) - # grep for the font in $PSMAPFILE. These are base font names, such as - # rpplr (the original) or pplr0 (an interim step) or pplr8r (current). - : ${PSMAPFILE=`kpsewhich --format=map psfonts.map ps2pk.map`} - pattern="^$NAME"'([ ]|$)' - psline=`egrep "$pattern" $PSMAPFILE | tail -1` - if test -n "$psline"; then - set x `echo "$psline" | sed 's%[<["]%%g'` - shift; shift; shift; - encoding=; psname=; slant=; extend= - while test ! -z "$1"; do - case "$1" in - *.enc) encoding="-e $1";; - *.pf[ab]) psname="$1";; - *SlantFont) slant="-S $lastopt";; - *ExtendFont) extend="-E $lastopt";; - esac - lastopt="$1" - shift - done - # Guessing the name of the type1 font file as fallback: - ANAME=`echo $NAME | sed 's/8r$/8a/'` - for i in $NAME.pfa $NAME.pfb $ANAME.pfa $ANAME.pfb; do - if kpsewhich $i >/dev/null 2>&1; then - psname=$i - break - fi - done - - if [ -n "$psname" ]; then - cmd="ps2pk -v -X$DPI -R$BDPI $slant $extend $encoding $psname $NAME.${DPI}pk" - else - if gsftopk -t "$NAME"; then - echo "$progname: cannot find $NAME.pfa or $NAME.pfb. Trying gsftopk." >&2 - cmd="gsftopk $NAME $DPI" - fi - fi - fi;; - esac - - # unsupported by $ps_to_pk, try other conversions: - if test -z "$cmd"; then - if (ttf2pk -t -q $NAME) >/dev/null 2>&1; then - cmd="ttf2pk -q $NAME $DPI" - elif (hbf2gf -t -q $NAME) >/dev/null 2>&1; then - cmd="hbf2gf -q -p $NAME $DPI" - else - echo "$progname: don't know how to create bitmap font for $NAME." >&2 - echo "$progname: perhaps $NAME is missing from the map file." >&2 - exit 1 - fi - fi -fi - -OIFS=$IFS; IFS=$SEP -set x `"$MT_MKTEXNAM" $NAME $DPI $MODE $DEST`; shift -IFS=$OIFS - -PKDEST="$1" -PKDESTDIR=`echo "$PKDEST" | sed 's%/[^/][^/]*$%%'` # can't rely on dirname -PKNAME=`basename "$PKDEST"` -GFNAME=$NAME.${DPI}gf - -if test -r "$PKDESTDIR/$PKNAME"; then - echo "$progname: $PKDESTDIR/$PKNAME already exists." >&2 - echo "$PKDESTDIR/$PKNAME" >$STDOUT - "$MT_MKTEXUPD" "$PKDESTDIR" $PKNAME - exit 0 -fi - -"$MT_MKTEXDIR" "$PKDESTDIR" -if test ! -d "$PKDESTDIR"; then - echo "$progname: $MT_MKTEXDIR $PKDESTDIR failed." >&2 - exit 1 -fi - -echo "$progname: Running $cmd" -$cmd </dev/null || { - # Don't abort if only "Strange path", "bad pos" or "angle(0,0)" - # errors occurr. - grep '^!' $NAME.log | sort >$$.errs 2>/dev/null - grep '^! Strange path' $$.errs >$$.strange 2>/dev/null - grep '^! bad pos.' $$.errs >$$.badpos 2>/dev/null - grep '^! angle(0,0) is taken as zero.' $$.errs >$$.angle 2>/dev/null - cat $$.badpos $$.strange $$.angle | sort > $$.errs_accept - if cmp $$.errs $$.errs_accept >/dev/null 2>&1; then - test -s $$.strange >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused strange path errors." >&2 - test -s $$.badpos >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused bad pos errors." >&2 - test -s $$.angle >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused angle(0,0) errors." >&2 - else - echo "$progname: \`$cmd' failed." >&2 - test -s $NAME.log && mv -f $NAME.log "$KPSE_DOT" - exit 1; - fi -} - -test -r $GFNAME && { gftopk ./$GFNAME $PKNAME || exit 1; } -test ! -f $PKNAME && test -f $NAME.${DPI}pk && mv $NAME.${DPI}pk $PKNAME -if test ! -s $PKNAME; then - echo "$progname: \`$cmd' failed to make $PKNAME." >&2 - exit 1 -fi - -# Install the PK file carefully, since others may be working simultaneously. -# Use cp when mv fails, since DOS will fail mv for deeply-nested directories. -mv $PKNAME "$PKDESTDIR/pk$$.tmp" 2>/dev/null \ - || cp $PKNAME "$PKDESTDIR/pk$$.tmp" || exit 1 -cd "$PKDESTDIR" || exit 1 -chmod `kpsestat -xst,go-w .` pk$$.tmp -test -r $PKNAME || mv pk$$.tmp $PKNAME || exit 1 - -# Update ls-R if necessary. -"$MT_MKTEXUPD" "$PKDESTDIR" $PKNAME - -# If this line (or an equivalent) is not present, dvipsk/xdvik/dviljk -# will think mktexpk failed. Any other output to stdout will also lose. -echo "$PKDESTDIR/$PKNAME" >$STDOUT -echo "$progname: $PKDESTDIR/$PKNAME: successfully generated." >&2 -) 1>&2 </dev/null +../../texmf-dist/scripts/texlive/mktexpk
\ No newline at end of file diff --git a/Master/bin/i386-linux/mktextfm b/Master/bin/i386-linux/mktextfm index d2c132aad89..70ae3a438ce 100755..120000 --- a/Master/bin/i386-linux/mktextfm +++ b/Master/bin/i386-linux/mktextfm @@ -1,162 +1 @@ -#!/bin/sh -# original mktextfm -- make a new TFM file, because one wasn't found. -# -# (If you change or delete the word `original' on the previous line, -# installation won't write this script over yours.) -# -# Primarily written by Thomas Esser, Karl Berry, and Olaf Weber. -# Public domain. - -version='$Id$' -progname=`echo $0 | sed 's%.*/%%'` - -# preferentially use subprograms from our own directory. -mydir=`echo "$0" | sed 's,/[^/]*$,,'` -mydir=`cd "$mydir" && pwd` -PATH="$mydir:$PATH"; export PATH - -usage="Usage: $progname [--destdir DESTDIR] FONT. - -Makes a TFM file for FONT, if possible. Use DESTDIR for the root of where -to install into, either the absolute directory name to use (if it starts -with a /) or relative to the default DESTDIR (if not). - -Report bugs to: tex-k@tug.org -TeX Live home page: <http://tug.org/texlive/> -" - -# Handle non-positional options, except for --version/--help -while test $# -gt 0; do - case "$1" in - --destdir) shift; DEST="$1"; shift ;; - --destdir=*) DEST=`echo "$1" | sed 's/--destdir=//'`; shift ;; - --version|-version) break ;; - --help|-help) break ;; - *) break ;; - esac -done - -# Common code for all scripts. -: ${MT_TEXMFMAIN=`kpsewhich --expand-path='$TEXMFMAIN'`} -: ${MT_MKTEX_OPT=`kpsewhich --format='web2c files' mktex.opt`} -test -n "$MT_MKTEX_OPT" || MT_MKTEX_OPT="$MT_TEXMFMAIN/web2c/mktex.opt" -if test ! -f "$MT_MKTEX_OPT"; then - echo "$progname: Cannot find mktex.opt; check your installation." >&2 - exit 1 -fi - -. "$MT_MKTEX_OPT" - -# Where do potential mf driver files go? -case "$MT_FEATURES" in - *nomfdrivers*) - : ${MT_MFDESTDIR=`pwd`} - export MT_MFDESTDIR;; -esac - -# start of redirection stdout -> stderr, stdin <- /dev/null -( - -NAME=`basename "$1" .tfm` -MAG=1 # mag=0 fails with larm1000.mf -#DEST="$2" -DPI=$BDPI - -OIFS=$IFS; IFS=$SEP -set x `"$MT_MKTEXNAM" $NAME $DPI $MODE $DEST`; shift -IFS=$OIFS - -PKDEST="$1" -TFMDEST="$2" -PKDESTDIR=`echo "$PKDEST" | sed 's%/[^/][^/]*$%%'` # can't rely on dirname -TFMDESTDIR=`echo "$TFMDEST" | sed 's%/[^/][^/]*$%%'` -PKNAME=`basename "$PKDEST"` -TFMNAME=$NAME.tfm -GFNAME=$NAME.$DPI'gf' - -if test -r "$TFMDESTDIR/$TFMNAME"; then - echo "$progname: $TFMDESTDIR/$TFMNAME already exists." >&2 - echo "$TFMDESTDIR/$TFMNAME" >$STDOUT - "$MT_MKTEXUPD" "$TFMDESTDIR" $TFMNAME - exit -fi - -# Try to create the destdir first. Do not create fonts, if this fails. -"$MT_MKTEXDIR" "$TFMDESTDIR" -if test ! -d "$TFMDESTDIR"; then - echo "$progname: mktexdir $TFMDESTDIR failed." - exit 1 -fi - -# Check if this font is supported by hbf2gf else use metafont. -if (hbf2gf -q -t $NAME) >/dev/null 2>&1; then - cmd="hbf2gf -g $NAME $DPI" -else - # determine the progname of metafont to use; prefer mf-nowin. - if (mf-nowin --version) >/dev/null 2>&1; then - MF="mf-nowin -progname=mf" - else - MF=mf - fi - - cmd="$MF \mode:=$MODE; mag:=$MAG; nonstopmode; input $NAME" -fi - -echo "$progname: Running $cmd" -$cmd </dev/null || { - # Don't abort if only "Strange path", "bad pos" or "angle(0,0)" - # errors occurr. - grep '^!' $NAME.log | sort >$$.errs 2>/dev/null - grep '^! Strange path' $$.errs >$$.strange 2>/dev/null - grep '^! bad pos.' $$.errs >$$.badpos 2>/dev/null - grep '^! angle(0,0) is taken as zero.' $$.errs >$$.angle 2>/dev/null - cat $$.badpos $$.strange $$.angle | sort > $$.errs_accept - if cmp $$.errs $$.errs_accept >/dev/null 2>&1; then - test -s $$.strange >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused strange path errors." >&2 - test -s $$.badpos >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused bad pos errors." >&2 - test -s $$.angle >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused angle(0,0) errors." >&2 - else - echo "$progname: \`$cmd' failed." >&2 - test -s $NAME.log && mv -f $NAME.log "$KPSE_DOT" - exit 1; - fi -} - -# hbf2gf just produces a .pl file: -test -r ./$NAME.pl && pltotf ./$NAME.pl $TFMNAME -test -r $TFMNAME || { echo "$progname: \`$cmd' failed to make $TFMNAME."; exit 1; } - -# Install the TFM file carefully, since others may be working simultaneously. -# Use cp when mv fails, since DOS will fail mv for deeply-nested directories. -mv $TFMNAME "$TFMDESTDIR/tfm$$.tmp" 2>/dev/null \ - || cp $TFMNAME "$TFMDESTDIR/tfm$$.tmp" || exit 1 -cd "$TFMDESTDIR" || exit 1 -chmod `kpsestat -xst,go-w .` tfm$$.tmp -test -r $TFMNAME || mv tfm$$.tmp $TFMNAME || exit 1 - -# OK, success with the TFM. -"$MT_MKTEXUPD" "$TFMDESTDIR" $TFMNAME -echo "$TFMDESTDIR/$TFMNAME" >$STDOUT -echo "$progname: $TFMDESTDIR/$TFMNAME: successfully generated." >&2 - -# Since we probably made a GF(->PK) file, too, may as well install it if -# it's needed. -cd $TEMPDIR -if test -r $GFNAME && test ! -f "$PKDESTDIR/$PKNAME"; then - gftopk ./$GFNAME $PKNAME || exit 1 - "$MT_MKTEXDIR" "$PKDESTDIR" - mv $PKNAME "$PKDESTDIR/pk$$.tmp" 2>/dev/null \ - || cp $PKNAME "$PKDESTDIR/pk$$.tmp" || exit 1 - cd "$PKDESTDIR" || exit 1 - if test -f $PKNAME; then - rm -f pk$$.tmp - else - chmod `kpsestat -xst,go-w .` pk$$.tmp - mv pk$$.tmp $PKNAME - "$MT_MKTEXUPD" "$PKDESTDIR" $PKNAME - fi -fi -) 1>&2 </dev/null +../../texmf-dist/scripts/texlive/mktextfm
\ No newline at end of file diff --git a/Master/bin/i386-netbsd/mktexlsr b/Master/bin/i386-netbsd/mktexlsr index 5fde39e2c2d..a36378a2b9f 100755..120000 --- a/Master/bin/i386-netbsd/mktexlsr +++ b/Master/bin/i386-netbsd/mktexlsr @@ -1,236 +1 @@ -#!/bin/sh -# original mktexlsr -- create or rebuild ls-R. -# -# (If you change or delete the word `original' on the previous line, -# installation won't write this script over yours.) -# -# Suitable for calling from cron, as in: -# 0 * * * * cd /your/texmf/root && /usr/local/texlive/bin/mktexlsr -# -# Originally written as `texhash' by Thomas Esser, Okt., 1994. -# Public domain. - -version='$Id: mktexlsr 46343 2018-01-17 00:55:32Z preining $' -progname=`echo $0 | sed 's%.*/%%'` - -usage="Usage: $progname [OPTION]... [DIR]... - -Rebuild ls-R filename databases used by TeX. If one or more arguments -DIRS are given, these are used as the directories in which to build -ls-R. Else all directories in the search path for ls-R files -(\$TEXMFDBS) are used. - -Options: - --dry-run do not actually update anything - --help display this help and exit - --quiet cancel --verbose - --silent same as --quiet - --verbose explain what is being done - --version output version information and exit - -If standard input is a terminal, --verbose is on by default. - -For more information, see the \`Filename database' section of -Kpathsea manual available at http://tug.org/kpathsea. - -Report bugs to: tex-k@tug.org -TeX Live home page: <http://tug.org/texlive/> -" - -# The simple PATH-prepending approach we take in other scripts doesn't -# handle DOS/Windows, but we don't use the shell scripts on Windows -# anyway, and does anyone want current TL on DOS or DJGPP? Maybe they -# can maintain their own changes if so. Leaving this code though, since -# it's always been here ... - -# MS-DOS and MS-Windows define $COMSPEC or $ComSpec and use `;' to separate -# directories in path lists whereas Unix uses `:'. Make an exception for -# Cygwin, which pretends to be UNIX. -# Create a variable that holds the right character to be used by the scripts. -DOSISH=no -case `uname -s` in - CYGWIN*|Cygwin*|cygwin*) ;; - *) if test -n "$COMSPEC" || test -n "$ComSpec"; then DOSISH=yes; fi -esac -if test "$DOSISH" = "no"; then SEP=':'; else SEP=';';fi - -# Add the location of the script to the PATH if necessary. This must -# be done before kpsewhich can be called, and thus cannot be put into -# mktex.opt. -dirname=`echo $0 | sed 's%/*[^/][^/]*$%%'` -case $dirname in - "") # Do nothing - ;; - /* | [A-z]:/*) # Absolute name - PATH="$dirname$SEP$PATH" - export PATH ;; - *) # Relative name - PATH="`pwd`/$dirname$SEP$PATH" - export PATH ;; -esac - -if tty -s; then verbose=true; else verbose=false; fi -dry_run=false -trees= - -# initialize treefile by either mktemp or some random name -# code taken from pdfjam and adjusted -{ - treefile=` - (umask 077 && mktemp "${TMPDIR-/tmp}/mktexlsrtrees.XXXXXXXXXX") 2>/dev/null - ` && test -n "$treefile" && test -f "$treefile" -} || { - ## We'll use awk to make random number, for portability - random=`awk 'END { srand(); printf ("%d\n", rand()*1000000); }' /dev/null` - treefile="${TMPDIR-/tmp}/mktexlsrtrees$$.$random" -} || exit $? - -trap 'cd /; rm -f $treefile; test -z "$db_dir_tmp" || rm -rf "$db_dir_tmp"; - exit' 0 1 2 3 7 13 15 - -# A copy of some stuff from mktex.opt, so we can run in the presence of -# terminally damaged ls-R files. -while test $# -gt 0; do - if test "x$1" = x--help || test "x$1" = x-help; then - echo "$usage" - exit 0 - elif test "x$1" = x--version || test "x$1" = x-version; then - echo "`basename $0` $version" - kpsewhich --version - exit 0 - elif test "x$1" = x--verbose || test "x$1" = x-verbose; then - verbose=true - elif test "x$1" = x--dry-run || test "x$1" = x-n; then - dry_run=true - elif test "x$1" = x--quiet || test "x$1" = x--silent \ - || test "x$1" = x-quiet || test "x$1" = x-silent ; then - verbose=false - elif test "x$1" = x--; then - : - elif echo "x$1" | grep '^x-' >/dev/null; then - echo "$progname: unknown option \`$1', try --help if you need it." >&2 - exit 1 - else - if test ! -d "$1"; then - echo "$progname: $1: not a directory, skipping." >&2 - shift - continue - fi - # By saving the argument in a file, we can later get it back while - # supporting spaces in the name. This still doesn't support - # newlines in the directory names, but nobody ever complains about - # that, and it seems much too much trouble to use \0 terminators. - (umask 077 - if echo "$1" >>"$treefile"; then :; else - echo "$progname: $treefile: could not append to arg file, goodbye." >&2 - exit 1 - fi - ) - fi - shift -done - -# mktexupd and mktexlsr make sure they're coordinated via this. A copy -# is found mktex.opt. -ls_R_magic='% ls-R -- filename database for kpathsea; do not change this line.' -# The old string, which should continue to work. -old_ls_R_magic='% ls-R -- maintained by MakeTeXls-R; do not change this line.' - -{ - # Get list of directories from the explicit arguments (now saved in - # $treefile), or $TEXMFDBS if no explicit args. Eliminate duplicates. - saveIFS=$IFS # break only at newline - IFS=' -' - if test -s "$treefile"; then - set x `sort "$treefile" | uniq` - else - set x `kpsewhich --show-path=ls-R | tr : ' -' | sort | uniq` - fi - IFS=$saveIFS - shift -} - -for TEXMFLS_R in "$@"; do - # Prepend cwd if the directory was relative. - case "$TEXMFLS_R" in - "") continue ;; # Strictly speaking, it is an error if this case is taken. - /* | [A-z]:/*) ;; - *) TEXMFLS_R="`pwd`/$TEXMFLS_R" - esac - # Allow for either ls-R and ls-r to exist. But create ls-R if we're - # working from scratch. - if test -f "$TEXMFLS_R/ls-R"; then - db_file="$TEXMFLS_R/ls-R" - elif test -f "$TEXMFLS_R/ls-r"; then - db_file="$TEXMFLS_R/ls-r" - else - db_file="$TEXMFLS_R/ls-R" - fi - # Follow a possible symlink to get the right filesystem. - # The '|| true' construct prevents an sh -e aborting. - db_readlink=`kpsereadlink "$TEXMFLS_R/ls-R" 2>/dev/null` || true - case "$db_readlink" in - "") ;; - /* | [A-z]:/*) db_file="$db_readlink" ;; - *) db_file="$TEXMFLS_R/$db_readlink" - esac - db_dir=`echo "$db_file" | sed 's%/[^/][^/]*$%%'` # can't rely on dirname - - # want to be silent if the directory doesn't exist, since the ls-R - # path ordinarily contains many nonexistent directories. - test -d "$db_dir" || continue - test -w "$db_dir" || { echo "$progname: $db_dir: directory not writable. Skipping..." >&2; continue; } - - if test ! -f "$db_file"; then - cp /dev/null "$db_file" - # Use same permissions as parent directory, minus x,s, or t bits. - chmod `kpsestat -xst "$db_dir"` "$db_file" - elif test -s "$db_file" \ - && test "x`sed '1s/
$//;1q' \"$db_file\"`" != "x$ls_R_magic" \ - && test "x`sed '1s/
$//;1q' \"$db_file\"`" != "x$old_ls_R_magic"; then - echo "$progname: $db_file: no magic string, skipping..." >&2 - continue - fi - - # Skip if we cannot write the file: - kpseaccess -w "$db_file" || { echo "$progname: $db_file: no write permission, skipping..." >&2; continue; } - - db_dir_tmp="$db_dir/lsR$$.tmp" - (umask 077 && mkdir "$db_dir_tmp" ) \ - || { echo "$progname: $db_dir_tmp: could not create directory, skipping..." >&2; continue; } - db_file_tmp="$db_dir_tmp/lsR$$.tmp" - rm -f "$db_file_tmp" - - $verbose && echo "$progname: Updating $db_file... " - $dry_run && continue - - echo "$ls_R_magic" >"$db_file_tmp" - - # The main task. We put ./: in the output, so top-level files can be - # found via ls-R. Probably irrelevant in practice. The sed command - # inserts the leading ./ for directory names, and removes ., .., and - # version control entries from the list. Also omit contents of any - # the version directories; sed apparently requires that we do that - # operation in a separate invocation. We do not try to support colons - # in directory names. - # - echo "./:" >>"$db_file_tmp" - vc_dirs='\.\(bzr\|git\|hg\|svn\)\|_darcs' - (cd "$TEXMFLS_R" && \ls -LRa 2>/dev/null) \ - | sed -e '/^$/{n;s%^\./%%;s%^%./%;}; /^\.$/d; /^\.\.$/d; /^'$vc_dirs'$/d;' \ - -e '/^[\.\/]*lsR[0-9]*\.tmp:*$/d' \ - | sed -e /$vc_dirs'.*:$/,/^$/d' \ - >>"$db_file_tmp" - - # To be really safe, a loop. - until PERMS=`kpsestat = "$db_file"`; do sleep 1; done - chmod $PERMS "$db_file_tmp" - rm -f "$db_file" - mv "$db_file_tmp" "$db_file" - rm -rf "$db_dir_tmp" -done - -$verbose && echo "$progname: Done." -exit 0 +../../texmf-dist/scripts/texlive/mktexlsr
\ No newline at end of file diff --git a/Master/bin/i386-netbsd/mktexmf b/Master/bin/i386-netbsd/mktexmf index bb868c12a8d..302c00f763e 100755..120000 --- a/Master/bin/i386-netbsd/mktexmf +++ b/Master/bin/i386-netbsd/mktexmf @@ -1,151 +1 @@ -#!/bin/sh -# original mktexmf -- make a new MF file, because one wasn't found. -# -# (If you change or delete the word `original' on the previous line, -# installation won't write this script over yours.) -# -# Originally written by Thomas Esser. -# Public domain. - -version='$Id: mktexmf 34656 2014-07-18 23:38:50Z karl $' - -# preferentially use subprograms from our own directory. -mydir=`echo "$0" | sed 's,/[^/]*$,,'` -mydir=`cd "$mydir" && pwd` -PATH="$mydir:$PATH"; export PATH - -usage="Usage: $0 FONT. - -Makes the Metafont source file for FONT, if possible. For example, -\`ecr12' or \`cmr11'. - -Report bugs to: tex-k@tug.org -TeX Live home page: <http://tug.org/texlive/> -" - -# Common code for all scripts. -: ${MT_TEXMFMAIN=`kpsewhich --expand-path='$TEXMFMAIN'`} -: ${MT_MKTEX_OPT=`kpsewhich --format='web2c files' mktex.opt`} -test -n "$MT_MKTEX_OPT" || MT_MKTEX_OPT="$MT_TEXMFMAIN/web2c/mktex.opt" -if test ! -f "$MT_MKTEX_OPT"; then - echo "$progname: Cannot find mktex.opt; check your installation." >&2 - exit 1 -fi - -. "$MT_MKTEX_OPT" - -( -# See comments in mktexpk. -name="`echo $1 | sed 's%.*/%%; s%\.mf$%%'`" -rootname=`echo "$name" | sed 's/[0-9]*$//'` -pointsize=`echo "$name" | sed "s/^$rootname//"` - -sauterroot=`kpsewhich b-$rootname.mf 2>/dev/null` -if test -n "$sauterroot"; then - rootfile=$sauterroot - rootname=b-$rootname -else - case $name in - # csso12[0-5][0-9] from CJK package; unsupported by mktexmf - csso12[0-5][0-9]) - rootfile=;; - *) - case $rootname in - cs*|lcsss*|icscsc*|icstt*|ilcsss*) - rootfile=`kpsewhich cscode.mf`;; - wn[bcdfirstuv]*|rx[bcdfiorstuvx][bcfhilmostx]|l[abcdhl][bcdfiorstuvx]*) - lhprefix=`echo "$name" | sed 's/^\(..\).*/\1/'` - rootfile=`kpsewhich ${lhprefix}codes.mf 2>/dev/null`;; - *) - rootfile=`kpsewhich $rootname.mf 2>/dev/null`;; - esac;; - esac -fi -{ test -z "$rootfile" || test ! -f "$rootfile"; } && exit 1 - -#if test -z "$MT_MFNAME"; then -OIFS=$IFS; IFS=$SEP -set x `"$MT_MKTEXNAM" $name`; shift -IFS=$OIFS -MT_MFNAME="$3" -#fi - -destdir=`echo "$MT_MFNAME" | sed 's%/[^/][^/]*$%%'` -test -d "$destdir" || "$MT_MKTEXDIR" "$destdir" || exit 1 -cd "$destdir" || exit 1 - -case "$pointsize" in - "") echo "$progname: no pointsize."; exit 1;; - 11) realsize=10.95;; # \magstephalf - 14) realsize=14.4;; # \magstep2 - 17) realsize=17.28;; # \magstep3 - 20) realsize=20.74;; # \magstep4 - 25) realsize=24.88;; # \magstep5 - 30) realsize=29.86;; # \magstep6 - 36) realsize=35.83;; # \magstep7 - # The new convention is to have three or four letters for the - # font name and four digits for the pointsize. The number is - # pointsize * 100. We effectively divide by 100 by ignoring the - # last two digits. - ????|?????) realsize=`echo "$pointsize" | sed 's/\(..\)$/.\1/'`;; - *) realsize="$pointsize";; -esac - -mfname="$name.mf" -if test -r "$mfname"; then - echo "$progname: $destdir/$mfname already exists." - echo "$destdir/$mfname" >$STDOUT - "$MT_MKTEXUPD" "$destdir" "$mfname" - exit 0 -fi - -case "$name" in - ec*|tc*) - cat > "mf$$.tmp" <<END -if unknown exbase: input exbase fi; -gensize:=$realsize; -generate $rootname; -END - ;; - dc*) - cat > "mf$$.tmp" <<END -if unknown dxbase: input dxbase fi; -gensize:=$realsize; -generate $rootname; -END - ;; - cs*|lcsss*|icscsc*|icstt*|ilcsss*) - cat > "mf$$.tmp" <<END -input cscode -use_driver; -END - ;; - wn[bcdfirstuv]*|rx[bcdfiorstuvx][bcfhilmostx]*|l[abcdhl][bcdfiorstuvx]*) - cat > "mf$$.tmp" <<END -input fikparm; -END - ;; - g[lmorst][bijmtwx][cilnoru]*) - # A small superset of the names of the cbgreek fonts. - cat > "mf$$.tmp" <<END -% generated by mktexmf -input cbgreek; -END - ;; - *) - cat > "mf$$.tmp" <<END -design_size := $realsize; -input $rootname; -END - ;; -esac - -chmod `kpsestat -xst,go-w .` "mf$$.tmp" -rm -f "$mfname" -mv "mf$$.tmp" "$mfname" - -echo "$destdir/$mfname" >$STDOUT -echo "$progname: $destdir/$mfname: successfully generated." >&2 -"$MT_MKTEXUPD" "$destdir" "$mfname" -exit 0 -) 1>&2 </dev/null +../../texmf-dist/scripts/texlive/mktexmf
\ No newline at end of file diff --git a/Master/bin/i386-netbsd/mktexpk b/Master/bin/i386-netbsd/mktexpk index 2672dc7f78c..a0d6db0121b 100755..120000 --- a/Master/bin/i386-netbsd/mktexpk +++ b/Master/bin/i386-netbsd/mktexpk @@ -1,284 +1 @@ -#!/bin/sh -# original mktexpk -- make a new PK font, because one wasn't found. -# -# (If you change or delete the word `original' on the previous line, -# installation won't write this script over yours.) -# -# Originally written by Thomas Esser, Karl Berry, and Olaf Weber. -# Public domain. - -version='$Id: mktexpk 34656 2014-07-18 23:38:50Z karl $' -progname=`echo $0 | sed 's%.*/%%'` - -# preferentially use subprograms from our own directory. -mydir=`echo "$0" | sed 's,/[^/]*$,,'` -mydir=`cd "$mydir" && pwd` -PATH="$mydir:$PATH"; export PATH - -usage="Usage: $progname [OPTIONS] NAME [REDIRECT], - Create a PK font. - ---dpi DPI use resolution DPI. ---bdpi BDPI use base resolution BDPI. ---mag MAG use magnificiation MAG. ---mfmode MODE use MODE as the METAFONT mode. ---destdir DESTDIR write fonts in DESTDIR. - -Try to create a bitmap PK file for NAME at resolution DPI, with an -assumed device base resolution of BDPI, and a Metafont \`mag' of -MAG. Use MODE for the METAFONT mode. Use DESTDIR for the root of where -to install into, either the absolute directory name to use (if it starts -with a /) or relative to the default DESTDIR (if not). REDIRECT, if -supplied, is a string of the form '>&n', where n is the number of the -file descriptor which is to receive, instead of stdout, the name of the -newly created pk file. - -If you expected the font to be available as an outline, and thus this -script does not work and should not have been called, most likely the -font's .tfm name is missing from the relevant map file (e.g., -psfonts.map for dvips, pdftex.map for pdftex). These map files are -typically maintained using updmap; q.v. - -For step-by-step instructions on making new fonts known to TeX, see -http://tug.org/fonts/fontinstall.html. - -Report bugs to: tex-k@tug.org -TeX Live home page: <http://tug.org/texlive/> -" - -# Handle non-positional options, except for --version/--help -while test $# -gt 0; do - case "$1" in - --destdir) shift; DEST="$1"; shift ;; - --destdir=*) DEST=`echo "$1" | sed 's/--destdir=//'`; shift ;; - --dpi) shift; DPI="$1"; shift ;; - --dpi=*) DPI=`echo "$1" | sed 's/--dpi=//'`; shift ;; - --bdpi) shift; BDPI="$1"; shift ;; - --bdpi=*) BDPI=`echo "$1" | sed 's/--bdpi=//'`; shift ;; - --mfmode) shift; test "x$1" != "x/" && MODE="$1"; shift ;; - --mfmode=*) test "x$1" != "x--mfmode/" \ - && MODE=`echo "$1" | sed 's/--mfmode=//'`; shift ;; - --mag) shift; MAG="$1"; shift;; - --mag=*) MAG=`echo "$1" | sed '/s--mag=//'`; shift;; - --version|-version) break ;; - --help|-help) break ;; - *) break ;; - esac -done - -if test "x$2" != x; then - tail="`echo \"x$2\" | sed 's/^x>&//' | grep '^[0-9]*$'`" - if test -z "$tail"; then - echo "$progname: argument '$2' ignored - bad file number" >&2 - elif test "$tail" != 1; then - eval 'exec 1>&$tail' - fi -fi - -mt_max_args=2 - -# Common code for all scripts. -: ${MT_TEXMFMAIN=`kpsewhich --expand-path='$TEXMFMAIN'`} -: ${MT_MKTEX_OPT=`kpsewhich --format='web2c files' mktex.opt`} -test -n "$MT_MKTEX_OPT" || MT_MKTEX_OPT="$MT_TEXMFMAIN/web2c/mktex.opt" -if test ! -f "$MT_MKTEX_OPT"; then - echo "$progname: Cannot find mktex.opt; check your installation." >&2 - exit 1 -fi - -. "$MT_MKTEX_OPT" - -# Where do potential driver files belong? -case "$MT_FEATURES" in - *nomfdrivers*) - : ${MT_MFDESTDIR=`pwd`} - export MT_MFDESTDIR;; -esac - -# Since we want to pass the generated filename and only that filename -# back to the caller on standard output, we do some redirections so -# regular echo's will end up on stderr, and do an echo >$STDOUT at the end. -# Then the contents of $STDOUT will be echoed to stdout by a trap. - -# start of redirection stdout -> stderr, stdin <- /dev/null -( - -NAME=$1 - -if kpsewhich $NAME.mf >/dev/null 2>&1 || mktexmf $NAME >/dev/null 2>&1; then - # determine the progname of metafont to use; prefer mf-nowin. - if (mf-nowin --version) >/dev/null 2>&1; then - MF="mf-nowin -progname=mf" - else - MF=mf - fi - - # Check that $BDPI and $MODE are consistent; if not, ignore the mode and - # hope we can correctly guess it from bdpi. (People like to specify the - # resolution on the command line, not the mode so much.) - if test -n "$MODE"; then - mf_bdpi=`$MF \ -'\mode:='$MODE';mode_setup;message"BDPI= "&decimal round pixels_per_inch;end.'\ - </dev/null \ - | awk '/DPI=/ {print $2}'` - if test "x$mf_bdpi" != x$BDPI; then - echo "$progname: Mismatched mode $MODE and resolution $BDPI; ignoring mode." >&2 - MODE= - fi - fi - - # If an explicit mode is not supplied, try to guess. You can get a - # list of extant modes from ftp://ftp.tug.org/tex/modes.mf. - if test -z "$MODE" || test "x$MODE" = xdefault; then - case "$BDPI" in - 85) MODE=sun;; - 100) MODE=nextscrn;; - 180) MODE=toshiba;; - 300) MODE=cx;; - 360) MODE=epstylus;; - 400) MODE=nexthi;; - 600) MODE=ljfour;; - 720) MODE=epscszz;; - 1200) MODE=ultre;; - 1270) MODE=linoone;; - 8000) MODE=dpdfezzz;; - *) echo "$progname: Can't guess mode for $BDPI dpi devices." >&2 - echo "$progname: Use a config file or option to specify the mode; see:" >&2 - echo "$progname: http://tug.org/texinfohtml/kpathsea.html#Unable-to-generate-fonts" >&2 - exit 1 - esac - fi - - # Run Metafont. Always use plain Metafont, since reading cmbase.mf - # does not noticeably slow things down. - cmd="$MF \mode:=$MODE; mag:=$MAG; nonstopmode; input $NAME" -else - MODE=modeless - # ps_to_pk is set in mktex.opt - case $ps_to_pk in - gsftopk) - if $ps_to_pk -t "$NAME"; then - cmd="$ps_to_pk $NAME $DPI" - fi;; - ps2pk) - # grep for the font in $PSMAPFILE. These are base font names, such as - # rpplr (the original) or pplr0 (an interim step) or pplr8r (current). - : ${PSMAPFILE=`kpsewhich --format=map psfonts.map ps2pk.map`} - pattern="^$NAME"'([ ]|$)' - psline=`egrep "$pattern" $PSMAPFILE | tail -1` - if test -n "$psline"; then - set x `echo "$psline" | sed 's%[<["]%%g'` - shift; shift; shift; - encoding=; psname=; slant=; extend= - while test ! -z "$1"; do - case "$1" in - *.enc) encoding="-e $1";; - *.pf[ab]) psname="$1";; - *SlantFont) slant="-S $lastopt";; - *ExtendFont) extend="-E $lastopt";; - esac - lastopt="$1" - shift - done - # Guessing the name of the type1 font file as fallback: - ANAME=`echo $NAME | sed 's/8r$/8a/'` - for i in $NAME.pfa $NAME.pfb $ANAME.pfa $ANAME.pfb; do - if kpsewhich $i >/dev/null 2>&1; then - psname=$i - break - fi - done - - if [ -n "$psname" ]; then - cmd="ps2pk -v -X$DPI -R$BDPI $slant $extend $encoding $psname $NAME.${DPI}pk" - else - if gsftopk -t "$NAME"; then - echo "$progname: cannot find $NAME.pfa or $NAME.pfb. Trying gsftopk." >&2 - cmd="gsftopk $NAME $DPI" - fi - fi - fi;; - esac - - # unsupported by $ps_to_pk, try other conversions: - if test -z "$cmd"; then - if (ttf2pk -t -q $NAME) >/dev/null 2>&1; then - cmd="ttf2pk -q $NAME $DPI" - elif (hbf2gf -t -q $NAME) >/dev/null 2>&1; then - cmd="hbf2gf -q -p $NAME $DPI" - else - echo "$progname: don't know how to create bitmap font for $NAME." >&2 - echo "$progname: perhaps $NAME is missing from the map file." >&2 - exit 1 - fi - fi -fi - -OIFS=$IFS; IFS=$SEP -set x `"$MT_MKTEXNAM" $NAME $DPI $MODE $DEST`; shift -IFS=$OIFS - -PKDEST="$1" -PKDESTDIR=`echo "$PKDEST" | sed 's%/[^/][^/]*$%%'` # can't rely on dirname -PKNAME=`basename "$PKDEST"` -GFNAME=$NAME.${DPI}gf - -if test -r "$PKDESTDIR/$PKNAME"; then - echo "$progname: $PKDESTDIR/$PKNAME already exists." >&2 - echo "$PKDESTDIR/$PKNAME" >$STDOUT - "$MT_MKTEXUPD" "$PKDESTDIR" $PKNAME - exit 0 -fi - -"$MT_MKTEXDIR" "$PKDESTDIR" -if test ! -d "$PKDESTDIR"; then - echo "$progname: $MT_MKTEXDIR $PKDESTDIR failed." >&2 - exit 1 -fi - -echo "$progname: Running $cmd" -$cmd </dev/null || { - # Don't abort if only "Strange path", "bad pos" or "angle(0,0)" - # errors occurr. - grep '^!' $NAME.log | sort >$$.errs 2>/dev/null - grep '^! Strange path' $$.errs >$$.strange 2>/dev/null - grep '^! bad pos.' $$.errs >$$.badpos 2>/dev/null - grep '^! angle(0,0) is taken as zero.' $$.errs >$$.angle 2>/dev/null - cat $$.badpos $$.strange $$.angle | sort > $$.errs_accept - if cmp $$.errs $$.errs_accept >/dev/null 2>&1; then - test -s $$.strange >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused strange path errors." >&2 - test -s $$.badpos >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused bad pos errors." >&2 - test -s $$.angle >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused angle(0,0) errors." >&2 - else - echo "$progname: \`$cmd' failed." >&2 - test -s $NAME.log && mv -f $NAME.log "$KPSE_DOT" - exit 1; - fi -} - -test -r $GFNAME && { gftopk ./$GFNAME $PKNAME || exit 1; } -test ! -f $PKNAME && test -f $NAME.${DPI}pk && mv $NAME.${DPI}pk $PKNAME -if test ! -s $PKNAME; then - echo "$progname: \`$cmd' failed to make $PKNAME." >&2 - exit 1 -fi - -# Install the PK file carefully, since others may be working simultaneously. -# Use cp when mv fails, since DOS will fail mv for deeply-nested directories. -mv $PKNAME "$PKDESTDIR/pk$$.tmp" 2>/dev/null \ - || cp $PKNAME "$PKDESTDIR/pk$$.tmp" || exit 1 -cd "$PKDESTDIR" || exit 1 -chmod `kpsestat -xst,go-w .` pk$$.tmp -test -r $PKNAME || mv pk$$.tmp $PKNAME || exit 1 - -# Update ls-R if necessary. -"$MT_MKTEXUPD" "$PKDESTDIR" $PKNAME - -# If this line (or an equivalent) is not present, dvipsk/xdvik/dviljk -# will think mktexpk failed. Any other output to stdout will also lose. -echo "$PKDESTDIR/$PKNAME" >$STDOUT -echo "$progname: $PKDESTDIR/$PKNAME: successfully generated." >&2 -) 1>&2 </dev/null +../../texmf-dist/scripts/texlive/mktexpk
\ No newline at end of file diff --git a/Master/bin/i386-netbsd/mktextfm b/Master/bin/i386-netbsd/mktextfm index 46e30a9c5dc..70ae3a438ce 100755..120000 --- a/Master/bin/i386-netbsd/mktextfm +++ b/Master/bin/i386-netbsd/mktextfm @@ -1,162 +1 @@ -#!/bin/sh -# original mktextfm -- make a new TFM file, because one wasn't found. -# -# (If you change or delete the word `original' on the previous line, -# installation won't write this script over yours.) -# -# Primarily written by Thomas Esser, Karl Berry, and Olaf Weber. -# Public domain. - -version='$Id: mktextfm 34656 2014-07-18 23:38:50Z karl $' -progname=`echo $0 | sed 's%.*/%%'` - -# preferentially use subprograms from our own directory. -mydir=`echo "$0" | sed 's,/[^/]*$,,'` -mydir=`cd "$mydir" && pwd` -PATH="$mydir:$PATH"; export PATH - -usage="Usage: $progname [--destdir DESTDIR] FONT. - -Makes a TFM file for FONT, if possible. Use DESTDIR for the root of where -to install into, either the absolute directory name to use (if it starts -with a /) or relative to the default DESTDIR (if not). - -Report bugs to: tex-k@tug.org -TeX Live home page: <http://tug.org/texlive/> -" - -# Handle non-positional options, except for --version/--help -while test $# -gt 0; do - case "$1" in - --destdir) shift; DEST="$1"; shift ;; - --destdir=*) DEST=`echo "$1" | sed 's/--destdir=//'`; shift ;; - --version|-version) break ;; - --help|-help) break ;; - *) break ;; - esac -done - -# Common code for all scripts. -: ${MT_TEXMFMAIN=`kpsewhich --expand-path='$TEXMFMAIN'`} -: ${MT_MKTEX_OPT=`kpsewhich --format='web2c files' mktex.opt`} -test -n "$MT_MKTEX_OPT" || MT_MKTEX_OPT="$MT_TEXMFMAIN/web2c/mktex.opt" -if test ! -f "$MT_MKTEX_OPT"; then - echo "$progname: Cannot find mktex.opt; check your installation." >&2 - exit 1 -fi - -. "$MT_MKTEX_OPT" - -# Where do potential mf driver files go? -case "$MT_FEATURES" in - *nomfdrivers*) - : ${MT_MFDESTDIR=`pwd`} - export MT_MFDESTDIR;; -esac - -# start of redirection stdout -> stderr, stdin <- /dev/null -( - -NAME=`basename "$1" .tfm` -MAG=1 # mag=0 fails with larm1000.mf -#DEST="$2" -DPI=$BDPI - -OIFS=$IFS; IFS=$SEP -set x `"$MT_MKTEXNAM" $NAME $DPI $MODE $DEST`; shift -IFS=$OIFS - -PKDEST="$1" -TFMDEST="$2" -PKDESTDIR=`echo "$PKDEST" | sed 's%/[^/][^/]*$%%'` # can't rely on dirname -TFMDESTDIR=`echo "$TFMDEST" | sed 's%/[^/][^/]*$%%'` -PKNAME=`basename "$PKDEST"` -TFMNAME=$NAME.tfm -GFNAME=$NAME.$DPI'gf' - -if test -r "$TFMDESTDIR/$TFMNAME"; then - echo "$progname: $TFMDESTDIR/$TFMNAME already exists." >&2 - echo "$TFMDESTDIR/$TFMNAME" >$STDOUT - "$MT_MKTEXUPD" "$TFMDESTDIR" $TFMNAME - exit -fi - -# Try to create the destdir first. Do not create fonts, if this fails. -"$MT_MKTEXDIR" "$TFMDESTDIR" -if test ! -d "$TFMDESTDIR"; then - echo "$progname: mktexdir $TFMDESTDIR failed." - exit 1 -fi - -# Check if this font is supported by hbf2gf else use metafont. -if (hbf2gf -q -t $NAME) >/dev/null 2>&1; then - cmd="hbf2gf -g $NAME $DPI" -else - # determine the progname of metafont to use; prefer mf-nowin. - if (mf-nowin --version) >/dev/null 2>&1; then - MF="mf-nowin -progname=mf" - else - MF=mf - fi - - cmd="$MF \mode:=$MODE; mag:=$MAG; nonstopmode; input $NAME" -fi - -echo "$progname: Running $cmd" -$cmd </dev/null || { - # Don't abort if only "Strange path", "bad pos" or "angle(0,0)" - # errors occurr. - grep '^!' $NAME.log | sort >$$.errs 2>/dev/null - grep '^! Strange path' $$.errs >$$.strange 2>/dev/null - grep '^! bad pos.' $$.errs >$$.badpos 2>/dev/null - grep '^! angle(0,0) is taken as zero.' $$.errs >$$.angle 2>/dev/null - cat $$.badpos $$.strange $$.angle | sort > $$.errs_accept - if cmp $$.errs $$.errs_accept >/dev/null 2>&1; then - test -s $$.strange >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused strange path errors." >&2 - test -s $$.badpos >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused bad pos errors." >&2 - test -s $$.angle >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused angle(0,0) errors." >&2 - else - echo "$progname: \`$cmd' failed." >&2 - test -s $NAME.log && mv -f $NAME.log "$KPSE_DOT" - exit 1; - fi -} - -# hbf2gf just produces a .pl file: -test -r ./$NAME.pl && pltotf ./$NAME.pl $TFMNAME -test -r $TFMNAME || { echo "$progname: \`$cmd' failed to make $TFMNAME."; exit 1; } - -# Install the TFM file carefully, since others may be working simultaneously. -# Use cp when mv fails, since DOS will fail mv for deeply-nested directories. -mv $TFMNAME "$TFMDESTDIR/tfm$$.tmp" 2>/dev/null \ - || cp $TFMNAME "$TFMDESTDIR/tfm$$.tmp" || exit 1 -cd "$TFMDESTDIR" || exit 1 -chmod `kpsestat -xst,go-w .` tfm$$.tmp -test -r $TFMNAME || mv tfm$$.tmp $TFMNAME || exit 1 - -# OK, success with the TFM. -"$MT_MKTEXUPD" "$TFMDESTDIR" $TFMNAME -echo "$TFMDESTDIR/$TFMNAME" >$STDOUT -echo "$progname: $TFMDESTDIR/$TFMNAME: successfully generated." >&2 - -# Since we probably made a GF(->PK) file, too, may as well install it if -# it's needed. -cd $TEMPDIR -if test -r $GFNAME && test ! -f "$PKDESTDIR/$PKNAME"; then - gftopk ./$GFNAME $PKNAME || exit 1 - "$MT_MKTEXDIR" "$PKDESTDIR" - mv $PKNAME "$PKDESTDIR/pk$$.tmp" 2>/dev/null \ - || cp $PKNAME "$PKDESTDIR/pk$$.tmp" || exit 1 - cd "$PKDESTDIR" || exit 1 - if test -f $PKNAME; then - rm -f pk$$.tmp - else - chmod `kpsestat -xst,go-w .` pk$$.tmp - mv pk$$.tmp $PKNAME - "$MT_MKTEXUPD" "$PKDESTDIR" $PKNAME - fi -fi -) 1>&2 </dev/null +../../texmf-dist/scripts/texlive/mktextfm
\ No newline at end of file diff --git a/Master/bin/i386-solaris/mktexlsr b/Master/bin/i386-solaris/mktexlsr index 5fde39e2c2d..a36378a2b9f 100755..120000 --- a/Master/bin/i386-solaris/mktexlsr +++ b/Master/bin/i386-solaris/mktexlsr @@ -1,236 +1 @@ -#!/bin/sh -# original mktexlsr -- create or rebuild ls-R. -# -# (If you change or delete the word `original' on the previous line, -# installation won't write this script over yours.) -# -# Suitable for calling from cron, as in: -# 0 * * * * cd /your/texmf/root && /usr/local/texlive/bin/mktexlsr -# -# Originally written as `texhash' by Thomas Esser, Okt., 1994. -# Public domain. - -version='$Id: mktexlsr 46343 2018-01-17 00:55:32Z preining $' -progname=`echo $0 | sed 's%.*/%%'` - -usage="Usage: $progname [OPTION]... [DIR]... - -Rebuild ls-R filename databases used by TeX. If one or more arguments -DIRS are given, these are used as the directories in which to build -ls-R. Else all directories in the search path for ls-R files -(\$TEXMFDBS) are used. - -Options: - --dry-run do not actually update anything - --help display this help and exit - --quiet cancel --verbose - --silent same as --quiet - --verbose explain what is being done - --version output version information and exit - -If standard input is a terminal, --verbose is on by default. - -For more information, see the \`Filename database' section of -Kpathsea manual available at http://tug.org/kpathsea. - -Report bugs to: tex-k@tug.org -TeX Live home page: <http://tug.org/texlive/> -" - -# The simple PATH-prepending approach we take in other scripts doesn't -# handle DOS/Windows, but we don't use the shell scripts on Windows -# anyway, and does anyone want current TL on DOS or DJGPP? Maybe they -# can maintain their own changes if so. Leaving this code though, since -# it's always been here ... - -# MS-DOS and MS-Windows define $COMSPEC or $ComSpec and use `;' to separate -# directories in path lists whereas Unix uses `:'. Make an exception for -# Cygwin, which pretends to be UNIX. -# Create a variable that holds the right character to be used by the scripts. -DOSISH=no -case `uname -s` in - CYGWIN*|Cygwin*|cygwin*) ;; - *) if test -n "$COMSPEC" || test -n "$ComSpec"; then DOSISH=yes; fi -esac -if test "$DOSISH" = "no"; then SEP=':'; else SEP=';';fi - -# Add the location of the script to the PATH if necessary. This must -# be done before kpsewhich can be called, and thus cannot be put into -# mktex.opt. -dirname=`echo $0 | sed 's%/*[^/][^/]*$%%'` -case $dirname in - "") # Do nothing - ;; - /* | [A-z]:/*) # Absolute name - PATH="$dirname$SEP$PATH" - export PATH ;; - *) # Relative name - PATH="`pwd`/$dirname$SEP$PATH" - export PATH ;; -esac - -if tty -s; then verbose=true; else verbose=false; fi -dry_run=false -trees= - -# initialize treefile by either mktemp or some random name -# code taken from pdfjam and adjusted -{ - treefile=` - (umask 077 && mktemp "${TMPDIR-/tmp}/mktexlsrtrees.XXXXXXXXXX") 2>/dev/null - ` && test -n "$treefile" && test -f "$treefile" -} || { - ## We'll use awk to make random number, for portability - random=`awk 'END { srand(); printf ("%d\n", rand()*1000000); }' /dev/null` - treefile="${TMPDIR-/tmp}/mktexlsrtrees$$.$random" -} || exit $? - -trap 'cd /; rm -f $treefile; test -z "$db_dir_tmp" || rm -rf "$db_dir_tmp"; - exit' 0 1 2 3 7 13 15 - -# A copy of some stuff from mktex.opt, so we can run in the presence of -# terminally damaged ls-R files. -while test $# -gt 0; do - if test "x$1" = x--help || test "x$1" = x-help; then - echo "$usage" - exit 0 - elif test "x$1" = x--version || test "x$1" = x-version; then - echo "`basename $0` $version" - kpsewhich --version - exit 0 - elif test "x$1" = x--verbose || test "x$1" = x-verbose; then - verbose=true - elif test "x$1" = x--dry-run || test "x$1" = x-n; then - dry_run=true - elif test "x$1" = x--quiet || test "x$1" = x--silent \ - || test "x$1" = x-quiet || test "x$1" = x-silent ; then - verbose=false - elif test "x$1" = x--; then - : - elif echo "x$1" | grep '^x-' >/dev/null; then - echo "$progname: unknown option \`$1', try --help if you need it." >&2 - exit 1 - else - if test ! -d "$1"; then - echo "$progname: $1: not a directory, skipping." >&2 - shift - continue - fi - # By saving the argument in a file, we can later get it back while - # supporting spaces in the name. This still doesn't support - # newlines in the directory names, but nobody ever complains about - # that, and it seems much too much trouble to use \0 terminators. - (umask 077 - if echo "$1" >>"$treefile"; then :; else - echo "$progname: $treefile: could not append to arg file, goodbye." >&2 - exit 1 - fi - ) - fi - shift -done - -# mktexupd and mktexlsr make sure they're coordinated via this. A copy -# is found mktex.opt. -ls_R_magic='% ls-R -- filename database for kpathsea; do not change this line.' -# The old string, which should continue to work. -old_ls_R_magic='% ls-R -- maintained by MakeTeXls-R; do not change this line.' - -{ - # Get list of directories from the explicit arguments (now saved in - # $treefile), or $TEXMFDBS if no explicit args. Eliminate duplicates. - saveIFS=$IFS # break only at newline - IFS=' -' - if test -s "$treefile"; then - set x `sort "$treefile" | uniq` - else - set x `kpsewhich --show-path=ls-R | tr : ' -' | sort | uniq` - fi - IFS=$saveIFS - shift -} - -for TEXMFLS_R in "$@"; do - # Prepend cwd if the directory was relative. - case "$TEXMFLS_R" in - "") continue ;; # Strictly speaking, it is an error if this case is taken. - /* | [A-z]:/*) ;; - *) TEXMFLS_R="`pwd`/$TEXMFLS_R" - esac - # Allow for either ls-R and ls-r to exist. But create ls-R if we're - # working from scratch. - if test -f "$TEXMFLS_R/ls-R"; then - db_file="$TEXMFLS_R/ls-R" - elif test -f "$TEXMFLS_R/ls-r"; then - db_file="$TEXMFLS_R/ls-r" - else - db_file="$TEXMFLS_R/ls-R" - fi - # Follow a possible symlink to get the right filesystem. - # The '|| true' construct prevents an sh -e aborting. - db_readlink=`kpsereadlink "$TEXMFLS_R/ls-R" 2>/dev/null` || true - case "$db_readlink" in - "") ;; - /* | [A-z]:/*) db_file="$db_readlink" ;; - *) db_file="$TEXMFLS_R/$db_readlink" - esac - db_dir=`echo "$db_file" | sed 's%/[^/][^/]*$%%'` # can't rely on dirname - - # want to be silent if the directory doesn't exist, since the ls-R - # path ordinarily contains many nonexistent directories. - test -d "$db_dir" || continue - test -w "$db_dir" || { echo "$progname: $db_dir: directory not writable. Skipping..." >&2; continue; } - - if test ! -f "$db_file"; then - cp /dev/null "$db_file" - # Use same permissions as parent directory, minus x,s, or t bits. - chmod `kpsestat -xst "$db_dir"` "$db_file" - elif test -s "$db_file" \ - && test "x`sed '1s/
$//;1q' \"$db_file\"`" != "x$ls_R_magic" \ - && test "x`sed '1s/
$//;1q' \"$db_file\"`" != "x$old_ls_R_magic"; then - echo "$progname: $db_file: no magic string, skipping..." >&2 - continue - fi - - # Skip if we cannot write the file: - kpseaccess -w "$db_file" || { echo "$progname: $db_file: no write permission, skipping..." >&2; continue; } - - db_dir_tmp="$db_dir/lsR$$.tmp" - (umask 077 && mkdir "$db_dir_tmp" ) \ - || { echo "$progname: $db_dir_tmp: could not create directory, skipping..." >&2; continue; } - db_file_tmp="$db_dir_tmp/lsR$$.tmp" - rm -f "$db_file_tmp" - - $verbose && echo "$progname: Updating $db_file... " - $dry_run && continue - - echo "$ls_R_magic" >"$db_file_tmp" - - # The main task. We put ./: in the output, so top-level files can be - # found via ls-R. Probably irrelevant in practice. The sed command - # inserts the leading ./ for directory names, and removes ., .., and - # version control entries from the list. Also omit contents of any - # the version directories; sed apparently requires that we do that - # operation in a separate invocation. We do not try to support colons - # in directory names. - # - echo "./:" >>"$db_file_tmp" - vc_dirs='\.\(bzr\|git\|hg\|svn\)\|_darcs' - (cd "$TEXMFLS_R" && \ls -LRa 2>/dev/null) \ - | sed -e '/^$/{n;s%^\./%%;s%^%./%;}; /^\.$/d; /^\.\.$/d; /^'$vc_dirs'$/d;' \ - -e '/^[\.\/]*lsR[0-9]*\.tmp:*$/d' \ - | sed -e /$vc_dirs'.*:$/,/^$/d' \ - >>"$db_file_tmp" - - # To be really safe, a loop. - until PERMS=`kpsestat = "$db_file"`; do sleep 1; done - chmod $PERMS "$db_file_tmp" - rm -f "$db_file" - mv "$db_file_tmp" "$db_file" - rm -rf "$db_dir_tmp" -done - -$verbose && echo "$progname: Done." -exit 0 +../../texmf-dist/scripts/texlive/mktexlsr
\ No newline at end of file diff --git a/Master/bin/i386-solaris/mktexmf b/Master/bin/i386-solaris/mktexmf index bb868c12a8d..302c00f763e 100755..120000 --- a/Master/bin/i386-solaris/mktexmf +++ b/Master/bin/i386-solaris/mktexmf @@ -1,151 +1 @@ -#!/bin/sh -# original mktexmf -- make a new MF file, because one wasn't found. -# -# (If you change or delete the word `original' on the previous line, -# installation won't write this script over yours.) -# -# Originally written by Thomas Esser. -# Public domain. - -version='$Id: mktexmf 34656 2014-07-18 23:38:50Z karl $' - -# preferentially use subprograms from our own directory. -mydir=`echo "$0" | sed 's,/[^/]*$,,'` -mydir=`cd "$mydir" && pwd` -PATH="$mydir:$PATH"; export PATH - -usage="Usage: $0 FONT. - -Makes the Metafont source file for FONT, if possible. For example, -\`ecr12' or \`cmr11'. - -Report bugs to: tex-k@tug.org -TeX Live home page: <http://tug.org/texlive/> -" - -# Common code for all scripts. -: ${MT_TEXMFMAIN=`kpsewhich --expand-path='$TEXMFMAIN'`} -: ${MT_MKTEX_OPT=`kpsewhich --format='web2c files' mktex.opt`} -test -n "$MT_MKTEX_OPT" || MT_MKTEX_OPT="$MT_TEXMFMAIN/web2c/mktex.opt" -if test ! -f "$MT_MKTEX_OPT"; then - echo "$progname: Cannot find mktex.opt; check your installation." >&2 - exit 1 -fi - -. "$MT_MKTEX_OPT" - -( -# See comments in mktexpk. -name="`echo $1 | sed 's%.*/%%; s%\.mf$%%'`" -rootname=`echo "$name" | sed 's/[0-9]*$//'` -pointsize=`echo "$name" | sed "s/^$rootname//"` - -sauterroot=`kpsewhich b-$rootname.mf 2>/dev/null` -if test -n "$sauterroot"; then - rootfile=$sauterroot - rootname=b-$rootname -else - case $name in - # csso12[0-5][0-9] from CJK package; unsupported by mktexmf - csso12[0-5][0-9]) - rootfile=;; - *) - case $rootname in - cs*|lcsss*|icscsc*|icstt*|ilcsss*) - rootfile=`kpsewhich cscode.mf`;; - wn[bcdfirstuv]*|rx[bcdfiorstuvx][bcfhilmostx]|l[abcdhl][bcdfiorstuvx]*) - lhprefix=`echo "$name" | sed 's/^\(..\).*/\1/'` - rootfile=`kpsewhich ${lhprefix}codes.mf 2>/dev/null`;; - *) - rootfile=`kpsewhich $rootname.mf 2>/dev/null`;; - esac;; - esac -fi -{ test -z "$rootfile" || test ! -f "$rootfile"; } && exit 1 - -#if test -z "$MT_MFNAME"; then -OIFS=$IFS; IFS=$SEP -set x `"$MT_MKTEXNAM" $name`; shift -IFS=$OIFS -MT_MFNAME="$3" -#fi - -destdir=`echo "$MT_MFNAME" | sed 's%/[^/][^/]*$%%'` -test -d "$destdir" || "$MT_MKTEXDIR" "$destdir" || exit 1 -cd "$destdir" || exit 1 - -case "$pointsize" in - "") echo "$progname: no pointsize."; exit 1;; - 11) realsize=10.95;; # \magstephalf - 14) realsize=14.4;; # \magstep2 - 17) realsize=17.28;; # \magstep3 - 20) realsize=20.74;; # \magstep4 - 25) realsize=24.88;; # \magstep5 - 30) realsize=29.86;; # \magstep6 - 36) realsize=35.83;; # \magstep7 - # The new convention is to have three or four letters for the - # font name and four digits for the pointsize. The number is - # pointsize * 100. We effectively divide by 100 by ignoring the - # last two digits. - ????|?????) realsize=`echo "$pointsize" | sed 's/\(..\)$/.\1/'`;; - *) realsize="$pointsize";; -esac - -mfname="$name.mf" -if test -r "$mfname"; then - echo "$progname: $destdir/$mfname already exists." - echo "$destdir/$mfname" >$STDOUT - "$MT_MKTEXUPD" "$destdir" "$mfname" - exit 0 -fi - -case "$name" in - ec*|tc*) - cat > "mf$$.tmp" <<END -if unknown exbase: input exbase fi; -gensize:=$realsize; -generate $rootname; -END - ;; - dc*) - cat > "mf$$.tmp" <<END -if unknown dxbase: input dxbase fi; -gensize:=$realsize; -generate $rootname; -END - ;; - cs*|lcsss*|icscsc*|icstt*|ilcsss*) - cat > "mf$$.tmp" <<END -input cscode -use_driver; -END - ;; - wn[bcdfirstuv]*|rx[bcdfiorstuvx][bcfhilmostx]*|l[abcdhl][bcdfiorstuvx]*) - cat > "mf$$.tmp" <<END -input fikparm; -END - ;; - g[lmorst][bijmtwx][cilnoru]*) - # A small superset of the names of the cbgreek fonts. - cat > "mf$$.tmp" <<END -% generated by mktexmf -input cbgreek; -END - ;; - *) - cat > "mf$$.tmp" <<END -design_size := $realsize; -input $rootname; -END - ;; -esac - -chmod `kpsestat -xst,go-w .` "mf$$.tmp" -rm -f "$mfname" -mv "mf$$.tmp" "$mfname" - -echo "$destdir/$mfname" >$STDOUT -echo "$progname: $destdir/$mfname: successfully generated." >&2 -"$MT_MKTEXUPD" "$destdir" "$mfname" -exit 0 -) 1>&2 </dev/null +../../texmf-dist/scripts/texlive/mktexmf
\ No newline at end of file diff --git a/Master/bin/i386-solaris/mktexpk b/Master/bin/i386-solaris/mktexpk index 2672dc7f78c..a0d6db0121b 100755..120000 --- a/Master/bin/i386-solaris/mktexpk +++ b/Master/bin/i386-solaris/mktexpk @@ -1,284 +1 @@ -#!/bin/sh -# original mktexpk -- make a new PK font, because one wasn't found. -# -# (If you change or delete the word `original' on the previous line, -# installation won't write this script over yours.) -# -# Originally written by Thomas Esser, Karl Berry, and Olaf Weber. -# Public domain. - -version='$Id: mktexpk 34656 2014-07-18 23:38:50Z karl $' -progname=`echo $0 | sed 's%.*/%%'` - -# preferentially use subprograms from our own directory. -mydir=`echo "$0" | sed 's,/[^/]*$,,'` -mydir=`cd "$mydir" && pwd` -PATH="$mydir:$PATH"; export PATH - -usage="Usage: $progname [OPTIONS] NAME [REDIRECT], - Create a PK font. - ---dpi DPI use resolution DPI. ---bdpi BDPI use base resolution BDPI. ---mag MAG use magnificiation MAG. ---mfmode MODE use MODE as the METAFONT mode. ---destdir DESTDIR write fonts in DESTDIR. - -Try to create a bitmap PK file for NAME at resolution DPI, with an -assumed device base resolution of BDPI, and a Metafont \`mag' of -MAG. Use MODE for the METAFONT mode. Use DESTDIR for the root of where -to install into, either the absolute directory name to use (if it starts -with a /) or relative to the default DESTDIR (if not). REDIRECT, if -supplied, is a string of the form '>&n', where n is the number of the -file descriptor which is to receive, instead of stdout, the name of the -newly created pk file. - -If you expected the font to be available as an outline, and thus this -script does not work and should not have been called, most likely the -font's .tfm name is missing from the relevant map file (e.g., -psfonts.map for dvips, pdftex.map for pdftex). These map files are -typically maintained using updmap; q.v. - -For step-by-step instructions on making new fonts known to TeX, see -http://tug.org/fonts/fontinstall.html. - -Report bugs to: tex-k@tug.org -TeX Live home page: <http://tug.org/texlive/> -" - -# Handle non-positional options, except for --version/--help -while test $# -gt 0; do - case "$1" in - --destdir) shift; DEST="$1"; shift ;; - --destdir=*) DEST=`echo "$1" | sed 's/--destdir=//'`; shift ;; - --dpi) shift; DPI="$1"; shift ;; - --dpi=*) DPI=`echo "$1" | sed 's/--dpi=//'`; shift ;; - --bdpi) shift; BDPI="$1"; shift ;; - --bdpi=*) BDPI=`echo "$1" | sed 's/--bdpi=//'`; shift ;; - --mfmode) shift; test "x$1" != "x/" && MODE="$1"; shift ;; - --mfmode=*) test "x$1" != "x--mfmode/" \ - && MODE=`echo "$1" | sed 's/--mfmode=//'`; shift ;; - --mag) shift; MAG="$1"; shift;; - --mag=*) MAG=`echo "$1" | sed '/s--mag=//'`; shift;; - --version|-version) break ;; - --help|-help) break ;; - *) break ;; - esac -done - -if test "x$2" != x; then - tail="`echo \"x$2\" | sed 's/^x>&//' | grep '^[0-9]*$'`" - if test -z "$tail"; then - echo "$progname: argument '$2' ignored - bad file number" >&2 - elif test "$tail" != 1; then - eval 'exec 1>&$tail' - fi -fi - -mt_max_args=2 - -# Common code for all scripts. -: ${MT_TEXMFMAIN=`kpsewhich --expand-path='$TEXMFMAIN'`} -: ${MT_MKTEX_OPT=`kpsewhich --format='web2c files' mktex.opt`} -test -n "$MT_MKTEX_OPT" || MT_MKTEX_OPT="$MT_TEXMFMAIN/web2c/mktex.opt" -if test ! -f "$MT_MKTEX_OPT"; then - echo "$progname: Cannot find mktex.opt; check your installation." >&2 - exit 1 -fi - -. "$MT_MKTEX_OPT" - -# Where do potential driver files belong? -case "$MT_FEATURES" in - *nomfdrivers*) - : ${MT_MFDESTDIR=`pwd`} - export MT_MFDESTDIR;; -esac - -# Since we want to pass the generated filename and only that filename -# back to the caller on standard output, we do some redirections so -# regular echo's will end up on stderr, and do an echo >$STDOUT at the end. -# Then the contents of $STDOUT will be echoed to stdout by a trap. - -# start of redirection stdout -> stderr, stdin <- /dev/null -( - -NAME=$1 - -if kpsewhich $NAME.mf >/dev/null 2>&1 || mktexmf $NAME >/dev/null 2>&1; then - # determine the progname of metafont to use; prefer mf-nowin. - if (mf-nowin --version) >/dev/null 2>&1; then - MF="mf-nowin -progname=mf" - else - MF=mf - fi - - # Check that $BDPI and $MODE are consistent; if not, ignore the mode and - # hope we can correctly guess it from bdpi. (People like to specify the - # resolution on the command line, not the mode so much.) - if test -n "$MODE"; then - mf_bdpi=`$MF \ -'\mode:='$MODE';mode_setup;message"BDPI= "&decimal round pixels_per_inch;end.'\ - </dev/null \ - | awk '/DPI=/ {print $2}'` - if test "x$mf_bdpi" != x$BDPI; then - echo "$progname: Mismatched mode $MODE and resolution $BDPI; ignoring mode." >&2 - MODE= - fi - fi - - # If an explicit mode is not supplied, try to guess. You can get a - # list of extant modes from ftp://ftp.tug.org/tex/modes.mf. - if test -z "$MODE" || test "x$MODE" = xdefault; then - case "$BDPI" in - 85) MODE=sun;; - 100) MODE=nextscrn;; - 180) MODE=toshiba;; - 300) MODE=cx;; - 360) MODE=epstylus;; - 400) MODE=nexthi;; - 600) MODE=ljfour;; - 720) MODE=epscszz;; - 1200) MODE=ultre;; - 1270) MODE=linoone;; - 8000) MODE=dpdfezzz;; - *) echo "$progname: Can't guess mode for $BDPI dpi devices." >&2 - echo "$progname: Use a config file or option to specify the mode; see:" >&2 - echo "$progname: http://tug.org/texinfohtml/kpathsea.html#Unable-to-generate-fonts" >&2 - exit 1 - esac - fi - - # Run Metafont. Always use plain Metafont, since reading cmbase.mf - # does not noticeably slow things down. - cmd="$MF \mode:=$MODE; mag:=$MAG; nonstopmode; input $NAME" -else - MODE=modeless - # ps_to_pk is set in mktex.opt - case $ps_to_pk in - gsftopk) - if $ps_to_pk -t "$NAME"; then - cmd="$ps_to_pk $NAME $DPI" - fi;; - ps2pk) - # grep for the font in $PSMAPFILE. These are base font names, such as - # rpplr (the original) or pplr0 (an interim step) or pplr8r (current). - : ${PSMAPFILE=`kpsewhich --format=map psfonts.map ps2pk.map`} - pattern="^$NAME"'([ ]|$)' - psline=`egrep "$pattern" $PSMAPFILE | tail -1` - if test -n "$psline"; then - set x `echo "$psline" | sed 's%[<["]%%g'` - shift; shift; shift; - encoding=; psname=; slant=; extend= - while test ! -z "$1"; do - case "$1" in - *.enc) encoding="-e $1";; - *.pf[ab]) psname="$1";; - *SlantFont) slant="-S $lastopt";; - *ExtendFont) extend="-E $lastopt";; - esac - lastopt="$1" - shift - done - # Guessing the name of the type1 font file as fallback: - ANAME=`echo $NAME | sed 's/8r$/8a/'` - for i in $NAME.pfa $NAME.pfb $ANAME.pfa $ANAME.pfb; do - if kpsewhich $i >/dev/null 2>&1; then - psname=$i - break - fi - done - - if [ -n "$psname" ]; then - cmd="ps2pk -v -X$DPI -R$BDPI $slant $extend $encoding $psname $NAME.${DPI}pk" - else - if gsftopk -t "$NAME"; then - echo "$progname: cannot find $NAME.pfa or $NAME.pfb. Trying gsftopk." >&2 - cmd="gsftopk $NAME $DPI" - fi - fi - fi;; - esac - - # unsupported by $ps_to_pk, try other conversions: - if test -z "$cmd"; then - if (ttf2pk -t -q $NAME) >/dev/null 2>&1; then - cmd="ttf2pk -q $NAME $DPI" - elif (hbf2gf -t -q $NAME) >/dev/null 2>&1; then - cmd="hbf2gf -q -p $NAME $DPI" - else - echo "$progname: don't know how to create bitmap font for $NAME." >&2 - echo "$progname: perhaps $NAME is missing from the map file." >&2 - exit 1 - fi - fi -fi - -OIFS=$IFS; IFS=$SEP -set x `"$MT_MKTEXNAM" $NAME $DPI $MODE $DEST`; shift -IFS=$OIFS - -PKDEST="$1" -PKDESTDIR=`echo "$PKDEST" | sed 's%/[^/][^/]*$%%'` # can't rely on dirname -PKNAME=`basename "$PKDEST"` -GFNAME=$NAME.${DPI}gf - -if test -r "$PKDESTDIR/$PKNAME"; then - echo "$progname: $PKDESTDIR/$PKNAME already exists." >&2 - echo "$PKDESTDIR/$PKNAME" >$STDOUT - "$MT_MKTEXUPD" "$PKDESTDIR" $PKNAME - exit 0 -fi - -"$MT_MKTEXDIR" "$PKDESTDIR" -if test ! -d "$PKDESTDIR"; then - echo "$progname: $MT_MKTEXDIR $PKDESTDIR failed." >&2 - exit 1 -fi - -echo "$progname: Running $cmd" -$cmd </dev/null || { - # Don't abort if only "Strange path", "bad pos" or "angle(0,0)" - # errors occurr. - grep '^!' $NAME.log | sort >$$.errs 2>/dev/null - grep '^! Strange path' $$.errs >$$.strange 2>/dev/null - grep '^! bad pos.' $$.errs >$$.badpos 2>/dev/null - grep '^! angle(0,0) is taken as zero.' $$.errs >$$.angle 2>/dev/null - cat $$.badpos $$.strange $$.angle | sort > $$.errs_accept - if cmp $$.errs $$.errs_accept >/dev/null 2>&1; then - test -s $$.strange >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused strange path errors." >&2 - test -s $$.badpos >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused bad pos errors." >&2 - test -s $$.angle >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused angle(0,0) errors." >&2 - else - echo "$progname: \`$cmd' failed." >&2 - test -s $NAME.log && mv -f $NAME.log "$KPSE_DOT" - exit 1; - fi -} - -test -r $GFNAME && { gftopk ./$GFNAME $PKNAME || exit 1; } -test ! -f $PKNAME && test -f $NAME.${DPI}pk && mv $NAME.${DPI}pk $PKNAME -if test ! -s $PKNAME; then - echo "$progname: \`$cmd' failed to make $PKNAME." >&2 - exit 1 -fi - -# Install the PK file carefully, since others may be working simultaneously. -# Use cp when mv fails, since DOS will fail mv for deeply-nested directories. -mv $PKNAME "$PKDESTDIR/pk$$.tmp" 2>/dev/null \ - || cp $PKNAME "$PKDESTDIR/pk$$.tmp" || exit 1 -cd "$PKDESTDIR" || exit 1 -chmod `kpsestat -xst,go-w .` pk$$.tmp -test -r $PKNAME || mv pk$$.tmp $PKNAME || exit 1 - -# Update ls-R if necessary. -"$MT_MKTEXUPD" "$PKDESTDIR" $PKNAME - -# If this line (or an equivalent) is not present, dvipsk/xdvik/dviljk -# will think mktexpk failed. Any other output to stdout will also lose. -echo "$PKDESTDIR/$PKNAME" >$STDOUT -echo "$progname: $PKDESTDIR/$PKNAME: successfully generated." >&2 -) 1>&2 </dev/null +../../texmf-dist/scripts/texlive/mktexpk
\ No newline at end of file diff --git a/Master/bin/i386-solaris/mktextfm b/Master/bin/i386-solaris/mktextfm index 46e30a9c5dc..70ae3a438ce 100755..120000 --- a/Master/bin/i386-solaris/mktextfm +++ b/Master/bin/i386-solaris/mktextfm @@ -1,162 +1 @@ -#!/bin/sh -# original mktextfm -- make a new TFM file, because one wasn't found. -# -# (If you change or delete the word `original' on the previous line, -# installation won't write this script over yours.) -# -# Primarily written by Thomas Esser, Karl Berry, and Olaf Weber. -# Public domain. - -version='$Id: mktextfm 34656 2014-07-18 23:38:50Z karl $' -progname=`echo $0 | sed 's%.*/%%'` - -# preferentially use subprograms from our own directory. -mydir=`echo "$0" | sed 's,/[^/]*$,,'` -mydir=`cd "$mydir" && pwd` -PATH="$mydir:$PATH"; export PATH - -usage="Usage: $progname [--destdir DESTDIR] FONT. - -Makes a TFM file for FONT, if possible. Use DESTDIR for the root of where -to install into, either the absolute directory name to use (if it starts -with a /) or relative to the default DESTDIR (if not). - -Report bugs to: tex-k@tug.org -TeX Live home page: <http://tug.org/texlive/> -" - -# Handle non-positional options, except for --version/--help -while test $# -gt 0; do - case "$1" in - --destdir) shift; DEST="$1"; shift ;; - --destdir=*) DEST=`echo "$1" | sed 's/--destdir=//'`; shift ;; - --version|-version) break ;; - --help|-help) break ;; - *) break ;; - esac -done - -# Common code for all scripts. -: ${MT_TEXMFMAIN=`kpsewhich --expand-path='$TEXMFMAIN'`} -: ${MT_MKTEX_OPT=`kpsewhich --format='web2c files' mktex.opt`} -test -n "$MT_MKTEX_OPT" || MT_MKTEX_OPT="$MT_TEXMFMAIN/web2c/mktex.opt" -if test ! -f "$MT_MKTEX_OPT"; then - echo "$progname: Cannot find mktex.opt; check your installation." >&2 - exit 1 -fi - -. "$MT_MKTEX_OPT" - -# Where do potential mf driver files go? -case "$MT_FEATURES" in - *nomfdrivers*) - : ${MT_MFDESTDIR=`pwd`} - export MT_MFDESTDIR;; -esac - -# start of redirection stdout -> stderr, stdin <- /dev/null -( - -NAME=`basename "$1" .tfm` -MAG=1 # mag=0 fails with larm1000.mf -#DEST="$2" -DPI=$BDPI - -OIFS=$IFS; IFS=$SEP -set x `"$MT_MKTEXNAM" $NAME $DPI $MODE $DEST`; shift -IFS=$OIFS - -PKDEST="$1" -TFMDEST="$2" -PKDESTDIR=`echo "$PKDEST" | sed 's%/[^/][^/]*$%%'` # can't rely on dirname -TFMDESTDIR=`echo "$TFMDEST" | sed 's%/[^/][^/]*$%%'` -PKNAME=`basename "$PKDEST"` -TFMNAME=$NAME.tfm -GFNAME=$NAME.$DPI'gf' - -if test -r "$TFMDESTDIR/$TFMNAME"; then - echo "$progname: $TFMDESTDIR/$TFMNAME already exists." >&2 - echo "$TFMDESTDIR/$TFMNAME" >$STDOUT - "$MT_MKTEXUPD" "$TFMDESTDIR" $TFMNAME - exit -fi - -# Try to create the destdir first. Do not create fonts, if this fails. -"$MT_MKTEXDIR" "$TFMDESTDIR" -if test ! -d "$TFMDESTDIR"; then - echo "$progname: mktexdir $TFMDESTDIR failed." - exit 1 -fi - -# Check if this font is supported by hbf2gf else use metafont. -if (hbf2gf -q -t $NAME) >/dev/null 2>&1; then - cmd="hbf2gf -g $NAME $DPI" -else - # determine the progname of metafont to use; prefer mf-nowin. - if (mf-nowin --version) >/dev/null 2>&1; then - MF="mf-nowin -progname=mf" - else - MF=mf - fi - - cmd="$MF \mode:=$MODE; mag:=$MAG; nonstopmode; input $NAME" -fi - -echo "$progname: Running $cmd" -$cmd </dev/null || { - # Don't abort if only "Strange path", "bad pos" or "angle(0,0)" - # errors occurr. - grep '^!' $NAME.log | sort >$$.errs 2>/dev/null - grep '^! Strange path' $$.errs >$$.strange 2>/dev/null - grep '^! bad pos.' $$.errs >$$.badpos 2>/dev/null - grep '^! angle(0,0) is taken as zero.' $$.errs >$$.angle 2>/dev/null - cat $$.badpos $$.strange $$.angle | sort > $$.errs_accept - if cmp $$.errs $$.errs_accept >/dev/null 2>&1; then - test -s $$.strange >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused strange path errors." >&2 - test -s $$.badpos >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused bad pos errors." >&2 - test -s $$.angle >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused angle(0,0) errors." >&2 - else - echo "$progname: \`$cmd' failed." >&2 - test -s $NAME.log && mv -f $NAME.log "$KPSE_DOT" - exit 1; - fi -} - -# hbf2gf just produces a .pl file: -test -r ./$NAME.pl && pltotf ./$NAME.pl $TFMNAME -test -r $TFMNAME || { echo "$progname: \`$cmd' failed to make $TFMNAME."; exit 1; } - -# Install the TFM file carefully, since others may be working simultaneously. -# Use cp when mv fails, since DOS will fail mv for deeply-nested directories. -mv $TFMNAME "$TFMDESTDIR/tfm$$.tmp" 2>/dev/null \ - || cp $TFMNAME "$TFMDESTDIR/tfm$$.tmp" || exit 1 -cd "$TFMDESTDIR" || exit 1 -chmod `kpsestat -xst,go-w .` tfm$$.tmp -test -r $TFMNAME || mv tfm$$.tmp $TFMNAME || exit 1 - -# OK, success with the TFM. -"$MT_MKTEXUPD" "$TFMDESTDIR" $TFMNAME -echo "$TFMDESTDIR/$TFMNAME" >$STDOUT -echo "$progname: $TFMDESTDIR/$TFMNAME: successfully generated." >&2 - -# Since we probably made a GF(->PK) file, too, may as well install it if -# it's needed. -cd $TEMPDIR -if test -r $GFNAME && test ! -f "$PKDESTDIR/$PKNAME"; then - gftopk ./$GFNAME $PKNAME || exit 1 - "$MT_MKTEXDIR" "$PKDESTDIR" - mv $PKNAME "$PKDESTDIR/pk$$.tmp" 2>/dev/null \ - || cp $PKNAME "$PKDESTDIR/pk$$.tmp" || exit 1 - cd "$PKDESTDIR" || exit 1 - if test -f $PKNAME; then - rm -f pk$$.tmp - else - chmod `kpsestat -xst,go-w .` pk$$.tmp - mv pk$$.tmp $PKNAME - "$MT_MKTEXUPD" "$PKDESTDIR" $PKNAME - fi -fi -) 1>&2 </dev/null +../../texmf-dist/scripts/texlive/mktextfm
\ No newline at end of file diff --git a/Master/bin/x86_64-cygwin/mktexlsr b/Master/bin/x86_64-cygwin/mktexlsr index 5fde39e2c2d..a36378a2b9f 100755..120000 --- a/Master/bin/x86_64-cygwin/mktexlsr +++ b/Master/bin/x86_64-cygwin/mktexlsr @@ -1,236 +1 @@ -#!/bin/sh -# original mktexlsr -- create or rebuild ls-R. -# -# (If you change or delete the word `original' on the previous line, -# installation won't write this script over yours.) -# -# Suitable for calling from cron, as in: -# 0 * * * * cd /your/texmf/root && /usr/local/texlive/bin/mktexlsr -# -# Originally written as `texhash' by Thomas Esser, Okt., 1994. -# Public domain. - -version='$Id: mktexlsr 46343 2018-01-17 00:55:32Z preining $' -progname=`echo $0 | sed 's%.*/%%'` - -usage="Usage: $progname [OPTION]... [DIR]... - -Rebuild ls-R filename databases used by TeX. If one or more arguments -DIRS are given, these are used as the directories in which to build -ls-R. Else all directories in the search path for ls-R files -(\$TEXMFDBS) are used. - -Options: - --dry-run do not actually update anything - --help display this help and exit - --quiet cancel --verbose - --silent same as --quiet - --verbose explain what is being done - --version output version information and exit - -If standard input is a terminal, --verbose is on by default. - -For more information, see the \`Filename database' section of -Kpathsea manual available at http://tug.org/kpathsea. - -Report bugs to: tex-k@tug.org -TeX Live home page: <http://tug.org/texlive/> -" - -# The simple PATH-prepending approach we take in other scripts doesn't -# handle DOS/Windows, but we don't use the shell scripts on Windows -# anyway, and does anyone want current TL on DOS or DJGPP? Maybe they -# can maintain their own changes if so. Leaving this code though, since -# it's always been here ... - -# MS-DOS and MS-Windows define $COMSPEC or $ComSpec and use `;' to separate -# directories in path lists whereas Unix uses `:'. Make an exception for -# Cygwin, which pretends to be UNIX. -# Create a variable that holds the right character to be used by the scripts. -DOSISH=no -case `uname -s` in - CYGWIN*|Cygwin*|cygwin*) ;; - *) if test -n "$COMSPEC" || test -n "$ComSpec"; then DOSISH=yes; fi -esac -if test "$DOSISH" = "no"; then SEP=':'; else SEP=';';fi - -# Add the location of the script to the PATH if necessary. This must -# be done before kpsewhich can be called, and thus cannot be put into -# mktex.opt. -dirname=`echo $0 | sed 's%/*[^/][^/]*$%%'` -case $dirname in - "") # Do nothing - ;; - /* | [A-z]:/*) # Absolute name - PATH="$dirname$SEP$PATH" - export PATH ;; - *) # Relative name - PATH="`pwd`/$dirname$SEP$PATH" - export PATH ;; -esac - -if tty -s; then verbose=true; else verbose=false; fi -dry_run=false -trees= - -# initialize treefile by either mktemp or some random name -# code taken from pdfjam and adjusted -{ - treefile=` - (umask 077 && mktemp "${TMPDIR-/tmp}/mktexlsrtrees.XXXXXXXXXX") 2>/dev/null - ` && test -n "$treefile" && test -f "$treefile" -} || { - ## We'll use awk to make random number, for portability - random=`awk 'END { srand(); printf ("%d\n", rand()*1000000); }' /dev/null` - treefile="${TMPDIR-/tmp}/mktexlsrtrees$$.$random" -} || exit $? - -trap 'cd /; rm -f $treefile; test -z "$db_dir_tmp" || rm -rf "$db_dir_tmp"; - exit' 0 1 2 3 7 13 15 - -# A copy of some stuff from mktex.opt, so we can run in the presence of -# terminally damaged ls-R files. -while test $# -gt 0; do - if test "x$1" = x--help || test "x$1" = x-help; then - echo "$usage" - exit 0 - elif test "x$1" = x--version || test "x$1" = x-version; then - echo "`basename $0` $version" - kpsewhich --version - exit 0 - elif test "x$1" = x--verbose || test "x$1" = x-verbose; then - verbose=true - elif test "x$1" = x--dry-run || test "x$1" = x-n; then - dry_run=true - elif test "x$1" = x--quiet || test "x$1" = x--silent \ - || test "x$1" = x-quiet || test "x$1" = x-silent ; then - verbose=false - elif test "x$1" = x--; then - : - elif echo "x$1" | grep '^x-' >/dev/null; then - echo "$progname: unknown option \`$1', try --help if you need it." >&2 - exit 1 - else - if test ! -d "$1"; then - echo "$progname: $1: not a directory, skipping." >&2 - shift - continue - fi - # By saving the argument in a file, we can later get it back while - # supporting spaces in the name. This still doesn't support - # newlines in the directory names, but nobody ever complains about - # that, and it seems much too much trouble to use \0 terminators. - (umask 077 - if echo "$1" >>"$treefile"; then :; else - echo "$progname: $treefile: could not append to arg file, goodbye." >&2 - exit 1 - fi - ) - fi - shift -done - -# mktexupd and mktexlsr make sure they're coordinated via this. A copy -# is found mktex.opt. -ls_R_magic='% ls-R -- filename database for kpathsea; do not change this line.' -# The old string, which should continue to work. -old_ls_R_magic='% ls-R -- maintained by MakeTeXls-R; do not change this line.' - -{ - # Get list of directories from the explicit arguments (now saved in - # $treefile), or $TEXMFDBS if no explicit args. Eliminate duplicates. - saveIFS=$IFS # break only at newline - IFS=' -' - if test -s "$treefile"; then - set x `sort "$treefile" | uniq` - else - set x `kpsewhich --show-path=ls-R | tr : ' -' | sort | uniq` - fi - IFS=$saveIFS - shift -} - -for TEXMFLS_R in "$@"; do - # Prepend cwd if the directory was relative. - case "$TEXMFLS_R" in - "") continue ;; # Strictly speaking, it is an error if this case is taken. - /* | [A-z]:/*) ;; - *) TEXMFLS_R="`pwd`/$TEXMFLS_R" - esac - # Allow for either ls-R and ls-r to exist. But create ls-R if we're - # working from scratch. - if test -f "$TEXMFLS_R/ls-R"; then - db_file="$TEXMFLS_R/ls-R" - elif test -f "$TEXMFLS_R/ls-r"; then - db_file="$TEXMFLS_R/ls-r" - else - db_file="$TEXMFLS_R/ls-R" - fi - # Follow a possible symlink to get the right filesystem. - # The '|| true' construct prevents an sh -e aborting. - db_readlink=`kpsereadlink "$TEXMFLS_R/ls-R" 2>/dev/null` || true - case "$db_readlink" in - "") ;; - /* | [A-z]:/*) db_file="$db_readlink" ;; - *) db_file="$TEXMFLS_R/$db_readlink" - esac - db_dir=`echo "$db_file" | sed 's%/[^/][^/]*$%%'` # can't rely on dirname - - # want to be silent if the directory doesn't exist, since the ls-R - # path ordinarily contains many nonexistent directories. - test -d "$db_dir" || continue - test -w "$db_dir" || { echo "$progname: $db_dir: directory not writable. Skipping..." >&2; continue; } - - if test ! -f "$db_file"; then - cp /dev/null "$db_file" - # Use same permissions as parent directory, minus x,s, or t bits. - chmod `kpsestat -xst "$db_dir"` "$db_file" - elif test -s "$db_file" \ - && test "x`sed '1s/
$//;1q' \"$db_file\"`" != "x$ls_R_magic" \ - && test "x`sed '1s/
$//;1q' \"$db_file\"`" != "x$old_ls_R_magic"; then - echo "$progname: $db_file: no magic string, skipping..." >&2 - continue - fi - - # Skip if we cannot write the file: - kpseaccess -w "$db_file" || { echo "$progname: $db_file: no write permission, skipping..." >&2; continue; } - - db_dir_tmp="$db_dir/lsR$$.tmp" - (umask 077 && mkdir "$db_dir_tmp" ) \ - || { echo "$progname: $db_dir_tmp: could not create directory, skipping..." >&2; continue; } - db_file_tmp="$db_dir_tmp/lsR$$.tmp" - rm -f "$db_file_tmp" - - $verbose && echo "$progname: Updating $db_file... " - $dry_run && continue - - echo "$ls_R_magic" >"$db_file_tmp" - - # The main task. We put ./: in the output, so top-level files can be - # found via ls-R. Probably irrelevant in practice. The sed command - # inserts the leading ./ for directory names, and removes ., .., and - # version control entries from the list. Also omit contents of any - # the version directories; sed apparently requires that we do that - # operation in a separate invocation. We do not try to support colons - # in directory names. - # - echo "./:" >>"$db_file_tmp" - vc_dirs='\.\(bzr\|git\|hg\|svn\)\|_darcs' - (cd "$TEXMFLS_R" && \ls -LRa 2>/dev/null) \ - | sed -e '/^$/{n;s%^\./%%;s%^%./%;}; /^\.$/d; /^\.\.$/d; /^'$vc_dirs'$/d;' \ - -e '/^[\.\/]*lsR[0-9]*\.tmp:*$/d' \ - | sed -e /$vc_dirs'.*:$/,/^$/d' \ - >>"$db_file_tmp" - - # To be really safe, a loop. - until PERMS=`kpsestat = "$db_file"`; do sleep 1; done - chmod $PERMS "$db_file_tmp" - rm -f "$db_file" - mv "$db_file_tmp" "$db_file" - rm -rf "$db_dir_tmp" -done - -$verbose && echo "$progname: Done." -exit 0 +../../texmf-dist/scripts/texlive/mktexlsr
\ No newline at end of file diff --git a/Master/bin/x86_64-cygwin/mktexmf b/Master/bin/x86_64-cygwin/mktexmf index bb868c12a8d..302c00f763e 100755..120000 --- a/Master/bin/x86_64-cygwin/mktexmf +++ b/Master/bin/x86_64-cygwin/mktexmf @@ -1,151 +1 @@ -#!/bin/sh -# original mktexmf -- make a new MF file, because one wasn't found. -# -# (If you change or delete the word `original' on the previous line, -# installation won't write this script over yours.) -# -# Originally written by Thomas Esser. -# Public domain. - -version='$Id: mktexmf 34656 2014-07-18 23:38:50Z karl $' - -# preferentially use subprograms from our own directory. -mydir=`echo "$0" | sed 's,/[^/]*$,,'` -mydir=`cd "$mydir" && pwd` -PATH="$mydir:$PATH"; export PATH - -usage="Usage: $0 FONT. - -Makes the Metafont source file for FONT, if possible. For example, -\`ecr12' or \`cmr11'. - -Report bugs to: tex-k@tug.org -TeX Live home page: <http://tug.org/texlive/> -" - -# Common code for all scripts. -: ${MT_TEXMFMAIN=`kpsewhich --expand-path='$TEXMFMAIN'`} -: ${MT_MKTEX_OPT=`kpsewhich --format='web2c files' mktex.opt`} -test -n "$MT_MKTEX_OPT" || MT_MKTEX_OPT="$MT_TEXMFMAIN/web2c/mktex.opt" -if test ! -f "$MT_MKTEX_OPT"; then - echo "$progname: Cannot find mktex.opt; check your installation." >&2 - exit 1 -fi - -. "$MT_MKTEX_OPT" - -( -# See comments in mktexpk. -name="`echo $1 | sed 's%.*/%%; s%\.mf$%%'`" -rootname=`echo "$name" | sed 's/[0-9]*$//'` -pointsize=`echo "$name" | sed "s/^$rootname//"` - -sauterroot=`kpsewhich b-$rootname.mf 2>/dev/null` -if test -n "$sauterroot"; then - rootfile=$sauterroot - rootname=b-$rootname -else - case $name in - # csso12[0-5][0-9] from CJK package; unsupported by mktexmf - csso12[0-5][0-9]) - rootfile=;; - *) - case $rootname in - cs*|lcsss*|icscsc*|icstt*|ilcsss*) - rootfile=`kpsewhich cscode.mf`;; - wn[bcdfirstuv]*|rx[bcdfiorstuvx][bcfhilmostx]|l[abcdhl][bcdfiorstuvx]*) - lhprefix=`echo "$name" | sed 's/^\(..\).*/\1/'` - rootfile=`kpsewhich ${lhprefix}codes.mf 2>/dev/null`;; - *) - rootfile=`kpsewhich $rootname.mf 2>/dev/null`;; - esac;; - esac -fi -{ test -z "$rootfile" || test ! -f "$rootfile"; } && exit 1 - -#if test -z "$MT_MFNAME"; then -OIFS=$IFS; IFS=$SEP -set x `"$MT_MKTEXNAM" $name`; shift -IFS=$OIFS -MT_MFNAME="$3" -#fi - -destdir=`echo "$MT_MFNAME" | sed 's%/[^/][^/]*$%%'` -test -d "$destdir" || "$MT_MKTEXDIR" "$destdir" || exit 1 -cd "$destdir" || exit 1 - -case "$pointsize" in - "") echo "$progname: no pointsize."; exit 1;; - 11) realsize=10.95;; # \magstephalf - 14) realsize=14.4;; # \magstep2 - 17) realsize=17.28;; # \magstep3 - 20) realsize=20.74;; # \magstep4 - 25) realsize=24.88;; # \magstep5 - 30) realsize=29.86;; # \magstep6 - 36) realsize=35.83;; # \magstep7 - # The new convention is to have three or four letters for the - # font name and four digits for the pointsize. The number is - # pointsize * 100. We effectively divide by 100 by ignoring the - # last two digits. - ????|?????) realsize=`echo "$pointsize" | sed 's/\(..\)$/.\1/'`;; - *) realsize="$pointsize";; -esac - -mfname="$name.mf" -if test -r "$mfname"; then - echo "$progname: $destdir/$mfname already exists." - echo "$destdir/$mfname" >$STDOUT - "$MT_MKTEXUPD" "$destdir" "$mfname" - exit 0 -fi - -case "$name" in - ec*|tc*) - cat > "mf$$.tmp" <<END -if unknown exbase: input exbase fi; -gensize:=$realsize; -generate $rootname; -END - ;; - dc*) - cat > "mf$$.tmp" <<END -if unknown dxbase: input dxbase fi; -gensize:=$realsize; -generate $rootname; -END - ;; - cs*|lcsss*|icscsc*|icstt*|ilcsss*) - cat > "mf$$.tmp" <<END -input cscode -use_driver; -END - ;; - wn[bcdfirstuv]*|rx[bcdfiorstuvx][bcfhilmostx]*|l[abcdhl][bcdfiorstuvx]*) - cat > "mf$$.tmp" <<END -input fikparm; -END - ;; - g[lmorst][bijmtwx][cilnoru]*) - # A small superset of the names of the cbgreek fonts. - cat > "mf$$.tmp" <<END -% generated by mktexmf -input cbgreek; -END - ;; - *) - cat > "mf$$.tmp" <<END -design_size := $realsize; -input $rootname; -END - ;; -esac - -chmod `kpsestat -xst,go-w .` "mf$$.tmp" -rm -f "$mfname" -mv "mf$$.tmp" "$mfname" - -echo "$destdir/$mfname" >$STDOUT -echo "$progname: $destdir/$mfname: successfully generated." >&2 -"$MT_MKTEXUPD" "$destdir" "$mfname" -exit 0 -) 1>&2 </dev/null +../../texmf-dist/scripts/texlive/mktexmf
\ No newline at end of file diff --git a/Master/bin/x86_64-cygwin/mktexpk b/Master/bin/x86_64-cygwin/mktexpk index 2672dc7f78c..a0d6db0121b 100755..120000 --- a/Master/bin/x86_64-cygwin/mktexpk +++ b/Master/bin/x86_64-cygwin/mktexpk @@ -1,284 +1 @@ -#!/bin/sh -# original mktexpk -- make a new PK font, because one wasn't found. -# -# (If you change or delete the word `original' on the previous line, -# installation won't write this script over yours.) -# -# Originally written by Thomas Esser, Karl Berry, and Olaf Weber. -# Public domain. - -version='$Id: mktexpk 34656 2014-07-18 23:38:50Z karl $' -progname=`echo $0 | sed 's%.*/%%'` - -# preferentially use subprograms from our own directory. -mydir=`echo "$0" | sed 's,/[^/]*$,,'` -mydir=`cd "$mydir" && pwd` -PATH="$mydir:$PATH"; export PATH - -usage="Usage: $progname [OPTIONS] NAME [REDIRECT], - Create a PK font. - ---dpi DPI use resolution DPI. ---bdpi BDPI use base resolution BDPI. ---mag MAG use magnificiation MAG. ---mfmode MODE use MODE as the METAFONT mode. ---destdir DESTDIR write fonts in DESTDIR. - -Try to create a bitmap PK file for NAME at resolution DPI, with an -assumed device base resolution of BDPI, and a Metafont \`mag' of -MAG. Use MODE for the METAFONT mode. Use DESTDIR for the root of where -to install into, either the absolute directory name to use (if it starts -with a /) or relative to the default DESTDIR (if not). REDIRECT, if -supplied, is a string of the form '>&n', where n is the number of the -file descriptor which is to receive, instead of stdout, the name of the -newly created pk file. - -If you expected the font to be available as an outline, and thus this -script does not work and should not have been called, most likely the -font's .tfm name is missing from the relevant map file (e.g., -psfonts.map for dvips, pdftex.map for pdftex). These map files are -typically maintained using updmap; q.v. - -For step-by-step instructions on making new fonts known to TeX, see -http://tug.org/fonts/fontinstall.html. - -Report bugs to: tex-k@tug.org -TeX Live home page: <http://tug.org/texlive/> -" - -# Handle non-positional options, except for --version/--help -while test $# -gt 0; do - case "$1" in - --destdir) shift; DEST="$1"; shift ;; - --destdir=*) DEST=`echo "$1" | sed 's/--destdir=//'`; shift ;; - --dpi) shift; DPI="$1"; shift ;; - --dpi=*) DPI=`echo "$1" | sed 's/--dpi=//'`; shift ;; - --bdpi) shift; BDPI="$1"; shift ;; - --bdpi=*) BDPI=`echo "$1" | sed 's/--bdpi=//'`; shift ;; - --mfmode) shift; test "x$1" != "x/" && MODE="$1"; shift ;; - --mfmode=*) test "x$1" != "x--mfmode/" \ - && MODE=`echo "$1" | sed 's/--mfmode=//'`; shift ;; - --mag) shift; MAG="$1"; shift;; - --mag=*) MAG=`echo "$1" | sed '/s--mag=//'`; shift;; - --version|-version) break ;; - --help|-help) break ;; - *) break ;; - esac -done - -if test "x$2" != x; then - tail="`echo \"x$2\" | sed 's/^x>&//' | grep '^[0-9]*$'`" - if test -z "$tail"; then - echo "$progname: argument '$2' ignored - bad file number" >&2 - elif test "$tail" != 1; then - eval 'exec 1>&$tail' - fi -fi - -mt_max_args=2 - -# Common code for all scripts. -: ${MT_TEXMFMAIN=`kpsewhich --expand-path='$TEXMFMAIN'`} -: ${MT_MKTEX_OPT=`kpsewhich --format='web2c files' mktex.opt`} -test -n "$MT_MKTEX_OPT" || MT_MKTEX_OPT="$MT_TEXMFMAIN/web2c/mktex.opt" -if test ! -f "$MT_MKTEX_OPT"; then - echo "$progname: Cannot find mktex.opt; check your installation." >&2 - exit 1 -fi - -. "$MT_MKTEX_OPT" - -# Where do potential driver files belong? -case "$MT_FEATURES" in - *nomfdrivers*) - : ${MT_MFDESTDIR=`pwd`} - export MT_MFDESTDIR;; -esac - -# Since we want to pass the generated filename and only that filename -# back to the caller on standard output, we do some redirections so -# regular echo's will end up on stderr, and do an echo >$STDOUT at the end. -# Then the contents of $STDOUT will be echoed to stdout by a trap. - -# start of redirection stdout -> stderr, stdin <- /dev/null -( - -NAME=$1 - -if kpsewhich $NAME.mf >/dev/null 2>&1 || mktexmf $NAME >/dev/null 2>&1; then - # determine the progname of metafont to use; prefer mf-nowin. - if (mf-nowin --version) >/dev/null 2>&1; then - MF="mf-nowin -progname=mf" - else - MF=mf - fi - - # Check that $BDPI and $MODE are consistent; if not, ignore the mode and - # hope we can correctly guess it from bdpi. (People like to specify the - # resolution on the command line, not the mode so much.) - if test -n "$MODE"; then - mf_bdpi=`$MF \ -'\mode:='$MODE';mode_setup;message"BDPI= "&decimal round pixels_per_inch;end.'\ - </dev/null \ - | awk '/DPI=/ {print $2}'` - if test "x$mf_bdpi" != x$BDPI; then - echo "$progname: Mismatched mode $MODE and resolution $BDPI; ignoring mode." >&2 - MODE= - fi - fi - - # If an explicit mode is not supplied, try to guess. You can get a - # list of extant modes from ftp://ftp.tug.org/tex/modes.mf. - if test -z "$MODE" || test "x$MODE" = xdefault; then - case "$BDPI" in - 85) MODE=sun;; - 100) MODE=nextscrn;; - 180) MODE=toshiba;; - 300) MODE=cx;; - 360) MODE=epstylus;; - 400) MODE=nexthi;; - 600) MODE=ljfour;; - 720) MODE=epscszz;; - 1200) MODE=ultre;; - 1270) MODE=linoone;; - 8000) MODE=dpdfezzz;; - *) echo "$progname: Can't guess mode for $BDPI dpi devices." >&2 - echo "$progname: Use a config file or option to specify the mode; see:" >&2 - echo "$progname: http://tug.org/texinfohtml/kpathsea.html#Unable-to-generate-fonts" >&2 - exit 1 - esac - fi - - # Run Metafont. Always use plain Metafont, since reading cmbase.mf - # does not noticeably slow things down. - cmd="$MF \mode:=$MODE; mag:=$MAG; nonstopmode; input $NAME" -else - MODE=modeless - # ps_to_pk is set in mktex.opt - case $ps_to_pk in - gsftopk) - if $ps_to_pk -t "$NAME"; then - cmd="$ps_to_pk $NAME $DPI" - fi;; - ps2pk) - # grep for the font in $PSMAPFILE. These are base font names, such as - # rpplr (the original) or pplr0 (an interim step) or pplr8r (current). - : ${PSMAPFILE=`kpsewhich --format=map psfonts.map ps2pk.map`} - pattern="^$NAME"'([ ]|$)' - psline=`egrep "$pattern" $PSMAPFILE | tail -1` - if test -n "$psline"; then - set x `echo "$psline" | sed 's%[<["]%%g'` - shift; shift; shift; - encoding=; psname=; slant=; extend= - while test ! -z "$1"; do - case "$1" in - *.enc) encoding="-e $1";; - *.pf[ab]) psname="$1";; - *SlantFont) slant="-S $lastopt";; - *ExtendFont) extend="-E $lastopt";; - esac - lastopt="$1" - shift - done - # Guessing the name of the type1 font file as fallback: - ANAME=`echo $NAME | sed 's/8r$/8a/'` - for i in $NAME.pfa $NAME.pfb $ANAME.pfa $ANAME.pfb; do - if kpsewhich $i >/dev/null 2>&1; then - psname=$i - break - fi - done - - if [ -n "$psname" ]; then - cmd="ps2pk -v -X$DPI -R$BDPI $slant $extend $encoding $psname $NAME.${DPI}pk" - else - if gsftopk -t "$NAME"; then - echo "$progname: cannot find $NAME.pfa or $NAME.pfb. Trying gsftopk." >&2 - cmd="gsftopk $NAME $DPI" - fi - fi - fi;; - esac - - # unsupported by $ps_to_pk, try other conversions: - if test -z "$cmd"; then - if (ttf2pk -t -q $NAME) >/dev/null 2>&1; then - cmd="ttf2pk -q $NAME $DPI" - elif (hbf2gf -t -q $NAME) >/dev/null 2>&1; then - cmd="hbf2gf -q -p $NAME $DPI" - else - echo "$progname: don't know how to create bitmap font for $NAME." >&2 - echo "$progname: perhaps $NAME is missing from the map file." >&2 - exit 1 - fi - fi -fi - -OIFS=$IFS; IFS=$SEP -set x `"$MT_MKTEXNAM" $NAME $DPI $MODE $DEST`; shift -IFS=$OIFS - -PKDEST="$1" -PKDESTDIR=`echo "$PKDEST" | sed 's%/[^/][^/]*$%%'` # can't rely on dirname -PKNAME=`basename "$PKDEST"` -GFNAME=$NAME.${DPI}gf - -if test -r "$PKDESTDIR/$PKNAME"; then - echo "$progname: $PKDESTDIR/$PKNAME already exists." >&2 - echo "$PKDESTDIR/$PKNAME" >$STDOUT - "$MT_MKTEXUPD" "$PKDESTDIR" $PKNAME - exit 0 -fi - -"$MT_MKTEXDIR" "$PKDESTDIR" -if test ! -d "$PKDESTDIR"; then - echo "$progname: $MT_MKTEXDIR $PKDESTDIR failed." >&2 - exit 1 -fi - -echo "$progname: Running $cmd" -$cmd </dev/null || { - # Don't abort if only "Strange path", "bad pos" or "angle(0,0)" - # errors occurr. - grep '^!' $NAME.log | sort >$$.errs 2>/dev/null - grep '^! Strange path' $$.errs >$$.strange 2>/dev/null - grep '^! bad pos.' $$.errs >$$.badpos 2>/dev/null - grep '^! angle(0,0) is taken as zero.' $$.errs >$$.angle 2>/dev/null - cat $$.badpos $$.strange $$.angle | sort > $$.errs_accept - if cmp $$.errs $$.errs_accept >/dev/null 2>&1; then - test -s $$.strange >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused strange path errors." >&2 - test -s $$.badpos >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused bad pos errors." >&2 - test -s $$.angle >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused angle(0,0) errors." >&2 - else - echo "$progname: \`$cmd' failed." >&2 - test -s $NAME.log && mv -f $NAME.log "$KPSE_DOT" - exit 1; - fi -} - -test -r $GFNAME && { gftopk ./$GFNAME $PKNAME || exit 1; } -test ! -f $PKNAME && test -f $NAME.${DPI}pk && mv $NAME.${DPI}pk $PKNAME -if test ! -s $PKNAME; then - echo "$progname: \`$cmd' failed to make $PKNAME." >&2 - exit 1 -fi - -# Install the PK file carefully, since others may be working simultaneously. -# Use cp when mv fails, since DOS will fail mv for deeply-nested directories. -mv $PKNAME "$PKDESTDIR/pk$$.tmp" 2>/dev/null \ - || cp $PKNAME "$PKDESTDIR/pk$$.tmp" || exit 1 -cd "$PKDESTDIR" || exit 1 -chmod `kpsestat -xst,go-w .` pk$$.tmp -test -r $PKNAME || mv pk$$.tmp $PKNAME || exit 1 - -# Update ls-R if necessary. -"$MT_MKTEXUPD" "$PKDESTDIR" $PKNAME - -# If this line (or an equivalent) is not present, dvipsk/xdvik/dviljk -# will think mktexpk failed. Any other output to stdout will also lose. -echo "$PKDESTDIR/$PKNAME" >$STDOUT -echo "$progname: $PKDESTDIR/$PKNAME: successfully generated." >&2 -) 1>&2 </dev/null +../../texmf-dist/scripts/texlive/mktexpk
\ No newline at end of file diff --git a/Master/bin/x86_64-cygwin/mktextfm b/Master/bin/x86_64-cygwin/mktextfm index 46e30a9c5dc..70ae3a438ce 100755..120000 --- a/Master/bin/x86_64-cygwin/mktextfm +++ b/Master/bin/x86_64-cygwin/mktextfm @@ -1,162 +1 @@ -#!/bin/sh -# original mktextfm -- make a new TFM file, because one wasn't found. -# -# (If you change or delete the word `original' on the previous line, -# installation won't write this script over yours.) -# -# Primarily written by Thomas Esser, Karl Berry, and Olaf Weber. -# Public domain. - -version='$Id: mktextfm 34656 2014-07-18 23:38:50Z karl $' -progname=`echo $0 | sed 's%.*/%%'` - -# preferentially use subprograms from our own directory. -mydir=`echo "$0" | sed 's,/[^/]*$,,'` -mydir=`cd "$mydir" && pwd` -PATH="$mydir:$PATH"; export PATH - -usage="Usage: $progname [--destdir DESTDIR] FONT. - -Makes a TFM file for FONT, if possible. Use DESTDIR for the root of where -to install into, either the absolute directory name to use (if it starts -with a /) or relative to the default DESTDIR (if not). - -Report bugs to: tex-k@tug.org -TeX Live home page: <http://tug.org/texlive/> -" - -# Handle non-positional options, except for --version/--help -while test $# -gt 0; do - case "$1" in - --destdir) shift; DEST="$1"; shift ;; - --destdir=*) DEST=`echo "$1" | sed 's/--destdir=//'`; shift ;; - --version|-version) break ;; - --help|-help) break ;; - *) break ;; - esac -done - -# Common code for all scripts. -: ${MT_TEXMFMAIN=`kpsewhich --expand-path='$TEXMFMAIN'`} -: ${MT_MKTEX_OPT=`kpsewhich --format='web2c files' mktex.opt`} -test -n "$MT_MKTEX_OPT" || MT_MKTEX_OPT="$MT_TEXMFMAIN/web2c/mktex.opt" -if test ! -f "$MT_MKTEX_OPT"; then - echo "$progname: Cannot find mktex.opt; check your installation." >&2 - exit 1 -fi - -. "$MT_MKTEX_OPT" - -# Where do potential mf driver files go? -case "$MT_FEATURES" in - *nomfdrivers*) - : ${MT_MFDESTDIR=`pwd`} - export MT_MFDESTDIR;; -esac - -# start of redirection stdout -> stderr, stdin <- /dev/null -( - -NAME=`basename "$1" .tfm` -MAG=1 # mag=0 fails with larm1000.mf -#DEST="$2" -DPI=$BDPI - -OIFS=$IFS; IFS=$SEP -set x `"$MT_MKTEXNAM" $NAME $DPI $MODE $DEST`; shift -IFS=$OIFS - -PKDEST="$1" -TFMDEST="$2" -PKDESTDIR=`echo "$PKDEST" | sed 's%/[^/][^/]*$%%'` # can't rely on dirname -TFMDESTDIR=`echo "$TFMDEST" | sed 's%/[^/][^/]*$%%'` -PKNAME=`basename "$PKDEST"` -TFMNAME=$NAME.tfm -GFNAME=$NAME.$DPI'gf' - -if test -r "$TFMDESTDIR/$TFMNAME"; then - echo "$progname: $TFMDESTDIR/$TFMNAME already exists." >&2 - echo "$TFMDESTDIR/$TFMNAME" >$STDOUT - "$MT_MKTEXUPD" "$TFMDESTDIR" $TFMNAME - exit -fi - -# Try to create the destdir first. Do not create fonts, if this fails. -"$MT_MKTEXDIR" "$TFMDESTDIR" -if test ! -d "$TFMDESTDIR"; then - echo "$progname: mktexdir $TFMDESTDIR failed." - exit 1 -fi - -# Check if this font is supported by hbf2gf else use metafont. -if (hbf2gf -q -t $NAME) >/dev/null 2>&1; then - cmd="hbf2gf -g $NAME $DPI" -else - # determine the progname of metafont to use; prefer mf-nowin. - if (mf-nowin --version) >/dev/null 2>&1; then - MF="mf-nowin -progname=mf" - else - MF=mf - fi - - cmd="$MF \mode:=$MODE; mag:=$MAG; nonstopmode; input $NAME" -fi - -echo "$progname: Running $cmd" -$cmd </dev/null || { - # Don't abort if only "Strange path", "bad pos" or "angle(0,0)" - # errors occurr. - grep '^!' $NAME.log | sort >$$.errs 2>/dev/null - grep '^! Strange path' $$.errs >$$.strange 2>/dev/null - grep '^! bad pos.' $$.errs >$$.badpos 2>/dev/null - grep '^! angle(0,0) is taken as zero.' $$.errs >$$.angle 2>/dev/null - cat $$.badpos $$.strange $$.angle | sort > $$.errs_accept - if cmp $$.errs $$.errs_accept >/dev/null 2>&1; then - test -s $$.strange >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused strange path errors." >&2 - test -s $$.badpos >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused bad pos errors." >&2 - test -s $$.angle >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused angle(0,0) errors." >&2 - else - echo "$progname: \`$cmd' failed." >&2 - test -s $NAME.log && mv -f $NAME.log "$KPSE_DOT" - exit 1; - fi -} - -# hbf2gf just produces a .pl file: -test -r ./$NAME.pl && pltotf ./$NAME.pl $TFMNAME -test -r $TFMNAME || { echo "$progname: \`$cmd' failed to make $TFMNAME."; exit 1; } - -# Install the TFM file carefully, since others may be working simultaneously. -# Use cp when mv fails, since DOS will fail mv for deeply-nested directories. -mv $TFMNAME "$TFMDESTDIR/tfm$$.tmp" 2>/dev/null \ - || cp $TFMNAME "$TFMDESTDIR/tfm$$.tmp" || exit 1 -cd "$TFMDESTDIR" || exit 1 -chmod `kpsestat -xst,go-w .` tfm$$.tmp -test -r $TFMNAME || mv tfm$$.tmp $TFMNAME || exit 1 - -# OK, success with the TFM. -"$MT_MKTEXUPD" "$TFMDESTDIR" $TFMNAME -echo "$TFMDESTDIR/$TFMNAME" >$STDOUT -echo "$progname: $TFMDESTDIR/$TFMNAME: successfully generated." >&2 - -# Since we probably made a GF(->PK) file, too, may as well install it if -# it's needed. -cd $TEMPDIR -if test -r $GFNAME && test ! -f "$PKDESTDIR/$PKNAME"; then - gftopk ./$GFNAME $PKNAME || exit 1 - "$MT_MKTEXDIR" "$PKDESTDIR" - mv $PKNAME "$PKDESTDIR/pk$$.tmp" 2>/dev/null \ - || cp $PKNAME "$PKDESTDIR/pk$$.tmp" || exit 1 - cd "$PKDESTDIR" || exit 1 - if test -f $PKNAME; then - rm -f pk$$.tmp - else - chmod `kpsestat -xst,go-w .` pk$$.tmp - mv pk$$.tmp $PKNAME - "$MT_MKTEXUPD" "$PKDESTDIR" $PKNAME - fi -fi -) 1>&2 </dev/null +../../texmf-dist/scripts/texlive/mktextfm
\ No newline at end of file diff --git a/Master/bin/x86_64-darwin/mktexlsr b/Master/bin/x86_64-darwin/mktexlsr index 5fde39e2c2d..a36378a2b9f 100755..120000 --- a/Master/bin/x86_64-darwin/mktexlsr +++ b/Master/bin/x86_64-darwin/mktexlsr @@ -1,236 +1 @@ -#!/bin/sh -# original mktexlsr -- create or rebuild ls-R. -# -# (If you change or delete the word `original' on the previous line, -# installation won't write this script over yours.) -# -# Suitable for calling from cron, as in: -# 0 * * * * cd /your/texmf/root && /usr/local/texlive/bin/mktexlsr -# -# Originally written as `texhash' by Thomas Esser, Okt., 1994. -# Public domain. - -version='$Id: mktexlsr 46343 2018-01-17 00:55:32Z preining $' -progname=`echo $0 | sed 's%.*/%%'` - -usage="Usage: $progname [OPTION]... [DIR]... - -Rebuild ls-R filename databases used by TeX. If one or more arguments -DIRS are given, these are used as the directories in which to build -ls-R. Else all directories in the search path for ls-R files -(\$TEXMFDBS) are used. - -Options: - --dry-run do not actually update anything - --help display this help and exit - --quiet cancel --verbose - --silent same as --quiet - --verbose explain what is being done - --version output version information and exit - -If standard input is a terminal, --verbose is on by default. - -For more information, see the \`Filename database' section of -Kpathsea manual available at http://tug.org/kpathsea. - -Report bugs to: tex-k@tug.org -TeX Live home page: <http://tug.org/texlive/> -" - -# The simple PATH-prepending approach we take in other scripts doesn't -# handle DOS/Windows, but we don't use the shell scripts on Windows -# anyway, and does anyone want current TL on DOS or DJGPP? Maybe they -# can maintain their own changes if so. Leaving this code though, since -# it's always been here ... - -# MS-DOS and MS-Windows define $COMSPEC or $ComSpec and use `;' to separate -# directories in path lists whereas Unix uses `:'. Make an exception for -# Cygwin, which pretends to be UNIX. -# Create a variable that holds the right character to be used by the scripts. -DOSISH=no -case `uname -s` in - CYGWIN*|Cygwin*|cygwin*) ;; - *) if test -n "$COMSPEC" || test -n "$ComSpec"; then DOSISH=yes; fi -esac -if test "$DOSISH" = "no"; then SEP=':'; else SEP=';';fi - -# Add the location of the script to the PATH if necessary. This must -# be done before kpsewhich can be called, and thus cannot be put into -# mktex.opt. -dirname=`echo $0 | sed 's%/*[^/][^/]*$%%'` -case $dirname in - "") # Do nothing - ;; - /* | [A-z]:/*) # Absolute name - PATH="$dirname$SEP$PATH" - export PATH ;; - *) # Relative name - PATH="`pwd`/$dirname$SEP$PATH" - export PATH ;; -esac - -if tty -s; then verbose=true; else verbose=false; fi -dry_run=false -trees= - -# initialize treefile by either mktemp or some random name -# code taken from pdfjam and adjusted -{ - treefile=` - (umask 077 && mktemp "${TMPDIR-/tmp}/mktexlsrtrees.XXXXXXXXXX") 2>/dev/null - ` && test -n "$treefile" && test -f "$treefile" -} || { - ## We'll use awk to make random number, for portability - random=`awk 'END { srand(); printf ("%d\n", rand()*1000000); }' /dev/null` - treefile="${TMPDIR-/tmp}/mktexlsrtrees$$.$random" -} || exit $? - -trap 'cd /; rm -f $treefile; test -z "$db_dir_tmp" || rm -rf "$db_dir_tmp"; - exit' 0 1 2 3 7 13 15 - -# A copy of some stuff from mktex.opt, so we can run in the presence of -# terminally damaged ls-R files. -while test $# -gt 0; do - if test "x$1" = x--help || test "x$1" = x-help; then - echo "$usage" - exit 0 - elif test "x$1" = x--version || test "x$1" = x-version; then - echo "`basename $0` $version" - kpsewhich --version - exit 0 - elif test "x$1" = x--verbose || test "x$1" = x-verbose; then - verbose=true - elif test "x$1" = x--dry-run || test "x$1" = x-n; then - dry_run=true - elif test "x$1" = x--quiet || test "x$1" = x--silent \ - || test "x$1" = x-quiet || test "x$1" = x-silent ; then - verbose=false - elif test "x$1" = x--; then - : - elif echo "x$1" | grep '^x-' >/dev/null; then - echo "$progname: unknown option \`$1', try --help if you need it." >&2 - exit 1 - else - if test ! -d "$1"; then - echo "$progname: $1: not a directory, skipping." >&2 - shift - continue - fi - # By saving the argument in a file, we can later get it back while - # supporting spaces in the name. This still doesn't support - # newlines in the directory names, but nobody ever complains about - # that, and it seems much too much trouble to use \0 terminators. - (umask 077 - if echo "$1" >>"$treefile"; then :; else - echo "$progname: $treefile: could not append to arg file, goodbye." >&2 - exit 1 - fi - ) - fi - shift -done - -# mktexupd and mktexlsr make sure they're coordinated via this. A copy -# is found mktex.opt. -ls_R_magic='% ls-R -- filename database for kpathsea; do not change this line.' -# The old string, which should continue to work. -old_ls_R_magic='% ls-R -- maintained by MakeTeXls-R; do not change this line.' - -{ - # Get list of directories from the explicit arguments (now saved in - # $treefile), or $TEXMFDBS if no explicit args. Eliminate duplicates. - saveIFS=$IFS # break only at newline - IFS=' -' - if test -s "$treefile"; then - set x `sort "$treefile" | uniq` - else - set x `kpsewhich --show-path=ls-R | tr : ' -' | sort | uniq` - fi - IFS=$saveIFS - shift -} - -for TEXMFLS_R in "$@"; do - # Prepend cwd if the directory was relative. - case "$TEXMFLS_R" in - "") continue ;; # Strictly speaking, it is an error if this case is taken. - /* | [A-z]:/*) ;; - *) TEXMFLS_R="`pwd`/$TEXMFLS_R" - esac - # Allow for either ls-R and ls-r to exist. But create ls-R if we're - # working from scratch. - if test -f "$TEXMFLS_R/ls-R"; then - db_file="$TEXMFLS_R/ls-R" - elif test -f "$TEXMFLS_R/ls-r"; then - db_file="$TEXMFLS_R/ls-r" - else - db_file="$TEXMFLS_R/ls-R" - fi - # Follow a possible symlink to get the right filesystem. - # The '|| true' construct prevents an sh -e aborting. - db_readlink=`kpsereadlink "$TEXMFLS_R/ls-R" 2>/dev/null` || true - case "$db_readlink" in - "") ;; - /* | [A-z]:/*) db_file="$db_readlink" ;; - *) db_file="$TEXMFLS_R/$db_readlink" - esac - db_dir=`echo "$db_file" | sed 's%/[^/][^/]*$%%'` # can't rely on dirname - - # want to be silent if the directory doesn't exist, since the ls-R - # path ordinarily contains many nonexistent directories. - test -d "$db_dir" || continue - test -w "$db_dir" || { echo "$progname: $db_dir: directory not writable. Skipping..." >&2; continue; } - - if test ! -f "$db_file"; then - cp /dev/null "$db_file" - # Use same permissions as parent directory, minus x,s, or t bits. - chmod `kpsestat -xst "$db_dir"` "$db_file" - elif test -s "$db_file" \ - && test "x`sed '1s/
$//;1q' \"$db_file\"`" != "x$ls_R_magic" \ - && test "x`sed '1s/
$//;1q' \"$db_file\"`" != "x$old_ls_R_magic"; then - echo "$progname: $db_file: no magic string, skipping..." >&2 - continue - fi - - # Skip if we cannot write the file: - kpseaccess -w "$db_file" || { echo "$progname: $db_file: no write permission, skipping..." >&2; continue; } - - db_dir_tmp="$db_dir/lsR$$.tmp" - (umask 077 && mkdir "$db_dir_tmp" ) \ - || { echo "$progname: $db_dir_tmp: could not create directory, skipping..." >&2; continue; } - db_file_tmp="$db_dir_tmp/lsR$$.tmp" - rm -f "$db_file_tmp" - - $verbose && echo "$progname: Updating $db_file... " - $dry_run && continue - - echo "$ls_R_magic" >"$db_file_tmp" - - # The main task. We put ./: in the output, so top-level files can be - # found via ls-R. Probably irrelevant in practice. The sed command - # inserts the leading ./ for directory names, and removes ., .., and - # version control entries from the list. Also omit contents of any - # the version directories; sed apparently requires that we do that - # operation in a separate invocation. We do not try to support colons - # in directory names. - # - echo "./:" >>"$db_file_tmp" - vc_dirs='\.\(bzr\|git\|hg\|svn\)\|_darcs' - (cd "$TEXMFLS_R" && \ls -LRa 2>/dev/null) \ - | sed -e '/^$/{n;s%^\./%%;s%^%./%;}; /^\.$/d; /^\.\.$/d; /^'$vc_dirs'$/d;' \ - -e '/^[\.\/]*lsR[0-9]*\.tmp:*$/d' \ - | sed -e /$vc_dirs'.*:$/,/^$/d' \ - >>"$db_file_tmp" - - # To be really safe, a loop. - until PERMS=`kpsestat = "$db_file"`; do sleep 1; done - chmod $PERMS "$db_file_tmp" - rm -f "$db_file" - mv "$db_file_tmp" "$db_file" - rm -rf "$db_dir_tmp" -done - -$verbose && echo "$progname: Done." -exit 0 +../../texmf-dist/scripts/texlive/mktexlsr
\ No newline at end of file diff --git a/Master/bin/x86_64-darwin/mktexmf b/Master/bin/x86_64-darwin/mktexmf index bb868c12a8d..302c00f763e 100755..120000 --- a/Master/bin/x86_64-darwin/mktexmf +++ b/Master/bin/x86_64-darwin/mktexmf @@ -1,151 +1 @@ -#!/bin/sh -# original mktexmf -- make a new MF file, because one wasn't found. -# -# (If you change or delete the word `original' on the previous line, -# installation won't write this script over yours.) -# -# Originally written by Thomas Esser. -# Public domain. - -version='$Id: mktexmf 34656 2014-07-18 23:38:50Z karl $' - -# preferentially use subprograms from our own directory. -mydir=`echo "$0" | sed 's,/[^/]*$,,'` -mydir=`cd "$mydir" && pwd` -PATH="$mydir:$PATH"; export PATH - -usage="Usage: $0 FONT. - -Makes the Metafont source file for FONT, if possible. For example, -\`ecr12' or \`cmr11'. - -Report bugs to: tex-k@tug.org -TeX Live home page: <http://tug.org/texlive/> -" - -# Common code for all scripts. -: ${MT_TEXMFMAIN=`kpsewhich --expand-path='$TEXMFMAIN'`} -: ${MT_MKTEX_OPT=`kpsewhich --format='web2c files' mktex.opt`} -test -n "$MT_MKTEX_OPT" || MT_MKTEX_OPT="$MT_TEXMFMAIN/web2c/mktex.opt" -if test ! -f "$MT_MKTEX_OPT"; then - echo "$progname: Cannot find mktex.opt; check your installation." >&2 - exit 1 -fi - -. "$MT_MKTEX_OPT" - -( -# See comments in mktexpk. -name="`echo $1 | sed 's%.*/%%; s%\.mf$%%'`" -rootname=`echo "$name" | sed 's/[0-9]*$//'` -pointsize=`echo "$name" | sed "s/^$rootname//"` - -sauterroot=`kpsewhich b-$rootname.mf 2>/dev/null` -if test -n "$sauterroot"; then - rootfile=$sauterroot - rootname=b-$rootname -else - case $name in - # csso12[0-5][0-9] from CJK package; unsupported by mktexmf - csso12[0-5][0-9]) - rootfile=;; - *) - case $rootname in - cs*|lcsss*|icscsc*|icstt*|ilcsss*) - rootfile=`kpsewhich cscode.mf`;; - wn[bcdfirstuv]*|rx[bcdfiorstuvx][bcfhilmostx]|l[abcdhl][bcdfiorstuvx]*) - lhprefix=`echo "$name" | sed 's/^\(..\).*/\1/'` - rootfile=`kpsewhich ${lhprefix}codes.mf 2>/dev/null`;; - *) - rootfile=`kpsewhich $rootname.mf 2>/dev/null`;; - esac;; - esac -fi -{ test -z "$rootfile" || test ! -f "$rootfile"; } && exit 1 - -#if test -z "$MT_MFNAME"; then -OIFS=$IFS; IFS=$SEP -set x `"$MT_MKTEXNAM" $name`; shift -IFS=$OIFS -MT_MFNAME="$3" -#fi - -destdir=`echo "$MT_MFNAME" | sed 's%/[^/][^/]*$%%'` -test -d "$destdir" || "$MT_MKTEXDIR" "$destdir" || exit 1 -cd "$destdir" || exit 1 - -case "$pointsize" in - "") echo "$progname: no pointsize."; exit 1;; - 11) realsize=10.95;; # \magstephalf - 14) realsize=14.4;; # \magstep2 - 17) realsize=17.28;; # \magstep3 - 20) realsize=20.74;; # \magstep4 - 25) realsize=24.88;; # \magstep5 - 30) realsize=29.86;; # \magstep6 - 36) realsize=35.83;; # \magstep7 - # The new convention is to have three or four letters for the - # font name and four digits for the pointsize. The number is - # pointsize * 100. We effectively divide by 100 by ignoring the - # last two digits. - ????|?????) realsize=`echo "$pointsize" | sed 's/\(..\)$/.\1/'`;; - *) realsize="$pointsize";; -esac - -mfname="$name.mf" -if test -r "$mfname"; then - echo "$progname: $destdir/$mfname already exists." - echo "$destdir/$mfname" >$STDOUT - "$MT_MKTEXUPD" "$destdir" "$mfname" - exit 0 -fi - -case "$name" in - ec*|tc*) - cat > "mf$$.tmp" <<END -if unknown exbase: input exbase fi; -gensize:=$realsize; -generate $rootname; -END - ;; - dc*) - cat > "mf$$.tmp" <<END -if unknown dxbase: input dxbase fi; -gensize:=$realsize; -generate $rootname; -END - ;; - cs*|lcsss*|icscsc*|icstt*|ilcsss*) - cat > "mf$$.tmp" <<END -input cscode -use_driver; -END - ;; - wn[bcdfirstuv]*|rx[bcdfiorstuvx][bcfhilmostx]*|l[abcdhl][bcdfiorstuvx]*) - cat > "mf$$.tmp" <<END -input fikparm; -END - ;; - g[lmorst][bijmtwx][cilnoru]*) - # A small superset of the names of the cbgreek fonts. - cat > "mf$$.tmp" <<END -% generated by mktexmf -input cbgreek; -END - ;; - *) - cat > "mf$$.tmp" <<END -design_size := $realsize; -input $rootname; -END - ;; -esac - -chmod `kpsestat -xst,go-w .` "mf$$.tmp" -rm -f "$mfname" -mv "mf$$.tmp" "$mfname" - -echo "$destdir/$mfname" >$STDOUT -echo "$progname: $destdir/$mfname: successfully generated." >&2 -"$MT_MKTEXUPD" "$destdir" "$mfname" -exit 0 -) 1>&2 </dev/null +../../texmf-dist/scripts/texlive/mktexmf
\ No newline at end of file diff --git a/Master/bin/x86_64-darwin/mktexpk b/Master/bin/x86_64-darwin/mktexpk index 2672dc7f78c..a0d6db0121b 100755..120000 --- a/Master/bin/x86_64-darwin/mktexpk +++ b/Master/bin/x86_64-darwin/mktexpk @@ -1,284 +1 @@ -#!/bin/sh -# original mktexpk -- make a new PK font, because one wasn't found. -# -# (If you change or delete the word `original' on the previous line, -# installation won't write this script over yours.) -# -# Originally written by Thomas Esser, Karl Berry, and Olaf Weber. -# Public domain. - -version='$Id: mktexpk 34656 2014-07-18 23:38:50Z karl $' -progname=`echo $0 | sed 's%.*/%%'` - -# preferentially use subprograms from our own directory. -mydir=`echo "$0" | sed 's,/[^/]*$,,'` -mydir=`cd "$mydir" && pwd` -PATH="$mydir:$PATH"; export PATH - -usage="Usage: $progname [OPTIONS] NAME [REDIRECT], - Create a PK font. - ---dpi DPI use resolution DPI. ---bdpi BDPI use base resolution BDPI. ---mag MAG use magnificiation MAG. ---mfmode MODE use MODE as the METAFONT mode. ---destdir DESTDIR write fonts in DESTDIR. - -Try to create a bitmap PK file for NAME at resolution DPI, with an -assumed device base resolution of BDPI, and a Metafont \`mag' of -MAG. Use MODE for the METAFONT mode. Use DESTDIR for the root of where -to install into, either the absolute directory name to use (if it starts -with a /) or relative to the default DESTDIR (if not). REDIRECT, if -supplied, is a string of the form '>&n', where n is the number of the -file descriptor which is to receive, instead of stdout, the name of the -newly created pk file. - -If you expected the font to be available as an outline, and thus this -script does not work and should not have been called, most likely the -font's .tfm name is missing from the relevant map file (e.g., -psfonts.map for dvips, pdftex.map for pdftex). These map files are -typically maintained using updmap; q.v. - -For step-by-step instructions on making new fonts known to TeX, see -http://tug.org/fonts/fontinstall.html. - -Report bugs to: tex-k@tug.org -TeX Live home page: <http://tug.org/texlive/> -" - -# Handle non-positional options, except for --version/--help -while test $# -gt 0; do - case "$1" in - --destdir) shift; DEST="$1"; shift ;; - --destdir=*) DEST=`echo "$1" | sed 's/--destdir=//'`; shift ;; - --dpi) shift; DPI="$1"; shift ;; - --dpi=*) DPI=`echo "$1" | sed 's/--dpi=//'`; shift ;; - --bdpi) shift; BDPI="$1"; shift ;; - --bdpi=*) BDPI=`echo "$1" | sed 's/--bdpi=//'`; shift ;; - --mfmode) shift; test "x$1" != "x/" && MODE="$1"; shift ;; - --mfmode=*) test "x$1" != "x--mfmode/" \ - && MODE=`echo "$1" | sed 's/--mfmode=//'`; shift ;; - --mag) shift; MAG="$1"; shift;; - --mag=*) MAG=`echo "$1" | sed '/s--mag=//'`; shift;; - --version|-version) break ;; - --help|-help) break ;; - *) break ;; - esac -done - -if test "x$2" != x; then - tail="`echo \"x$2\" | sed 's/^x>&//' | grep '^[0-9]*$'`" - if test -z "$tail"; then - echo "$progname: argument '$2' ignored - bad file number" >&2 - elif test "$tail" != 1; then - eval 'exec 1>&$tail' - fi -fi - -mt_max_args=2 - -# Common code for all scripts. -: ${MT_TEXMFMAIN=`kpsewhich --expand-path='$TEXMFMAIN'`} -: ${MT_MKTEX_OPT=`kpsewhich --format='web2c files' mktex.opt`} -test -n "$MT_MKTEX_OPT" || MT_MKTEX_OPT="$MT_TEXMFMAIN/web2c/mktex.opt" -if test ! -f "$MT_MKTEX_OPT"; then - echo "$progname: Cannot find mktex.opt; check your installation." >&2 - exit 1 -fi - -. "$MT_MKTEX_OPT" - -# Where do potential driver files belong? -case "$MT_FEATURES" in - *nomfdrivers*) - : ${MT_MFDESTDIR=`pwd`} - export MT_MFDESTDIR;; -esac - -# Since we want to pass the generated filename and only that filename -# back to the caller on standard output, we do some redirections so -# regular echo's will end up on stderr, and do an echo >$STDOUT at the end. -# Then the contents of $STDOUT will be echoed to stdout by a trap. - -# start of redirection stdout -> stderr, stdin <- /dev/null -( - -NAME=$1 - -if kpsewhich $NAME.mf >/dev/null 2>&1 || mktexmf $NAME >/dev/null 2>&1; then - # determine the progname of metafont to use; prefer mf-nowin. - if (mf-nowin --version) >/dev/null 2>&1; then - MF="mf-nowin -progname=mf" - else - MF=mf - fi - - # Check that $BDPI and $MODE are consistent; if not, ignore the mode and - # hope we can correctly guess it from bdpi. (People like to specify the - # resolution on the command line, not the mode so much.) - if test -n "$MODE"; then - mf_bdpi=`$MF \ -'\mode:='$MODE';mode_setup;message"BDPI= "&decimal round pixels_per_inch;end.'\ - </dev/null \ - | awk '/DPI=/ {print $2}'` - if test "x$mf_bdpi" != x$BDPI; then - echo "$progname: Mismatched mode $MODE and resolution $BDPI; ignoring mode." >&2 - MODE= - fi - fi - - # If an explicit mode is not supplied, try to guess. You can get a - # list of extant modes from ftp://ftp.tug.org/tex/modes.mf. - if test -z "$MODE" || test "x$MODE" = xdefault; then - case "$BDPI" in - 85) MODE=sun;; - 100) MODE=nextscrn;; - 180) MODE=toshiba;; - 300) MODE=cx;; - 360) MODE=epstylus;; - 400) MODE=nexthi;; - 600) MODE=ljfour;; - 720) MODE=epscszz;; - 1200) MODE=ultre;; - 1270) MODE=linoone;; - 8000) MODE=dpdfezzz;; - *) echo "$progname: Can't guess mode for $BDPI dpi devices." >&2 - echo "$progname: Use a config file or option to specify the mode; see:" >&2 - echo "$progname: http://tug.org/texinfohtml/kpathsea.html#Unable-to-generate-fonts" >&2 - exit 1 - esac - fi - - # Run Metafont. Always use plain Metafont, since reading cmbase.mf - # does not noticeably slow things down. - cmd="$MF \mode:=$MODE; mag:=$MAG; nonstopmode; input $NAME" -else - MODE=modeless - # ps_to_pk is set in mktex.opt - case $ps_to_pk in - gsftopk) - if $ps_to_pk -t "$NAME"; then - cmd="$ps_to_pk $NAME $DPI" - fi;; - ps2pk) - # grep for the font in $PSMAPFILE. These are base font names, such as - # rpplr (the original) or pplr0 (an interim step) or pplr8r (current). - : ${PSMAPFILE=`kpsewhich --format=map psfonts.map ps2pk.map`} - pattern="^$NAME"'([ ]|$)' - psline=`egrep "$pattern" $PSMAPFILE | tail -1` - if test -n "$psline"; then - set x `echo "$psline" | sed 's%[<["]%%g'` - shift; shift; shift; - encoding=; psname=; slant=; extend= - while test ! -z "$1"; do - case "$1" in - *.enc) encoding="-e $1";; - *.pf[ab]) psname="$1";; - *SlantFont) slant="-S $lastopt";; - *ExtendFont) extend="-E $lastopt";; - esac - lastopt="$1" - shift - done - # Guessing the name of the type1 font file as fallback: - ANAME=`echo $NAME | sed 's/8r$/8a/'` - for i in $NAME.pfa $NAME.pfb $ANAME.pfa $ANAME.pfb; do - if kpsewhich $i >/dev/null 2>&1; then - psname=$i - break - fi - done - - if [ -n "$psname" ]; then - cmd="ps2pk -v -X$DPI -R$BDPI $slant $extend $encoding $psname $NAME.${DPI}pk" - else - if gsftopk -t "$NAME"; then - echo "$progname: cannot find $NAME.pfa or $NAME.pfb. Trying gsftopk." >&2 - cmd="gsftopk $NAME $DPI" - fi - fi - fi;; - esac - - # unsupported by $ps_to_pk, try other conversions: - if test -z "$cmd"; then - if (ttf2pk -t -q $NAME) >/dev/null 2>&1; then - cmd="ttf2pk -q $NAME $DPI" - elif (hbf2gf -t -q $NAME) >/dev/null 2>&1; then - cmd="hbf2gf -q -p $NAME $DPI" - else - echo "$progname: don't know how to create bitmap font for $NAME." >&2 - echo "$progname: perhaps $NAME is missing from the map file." >&2 - exit 1 - fi - fi -fi - -OIFS=$IFS; IFS=$SEP -set x `"$MT_MKTEXNAM" $NAME $DPI $MODE $DEST`; shift -IFS=$OIFS - -PKDEST="$1" -PKDESTDIR=`echo "$PKDEST" | sed 's%/[^/][^/]*$%%'` # can't rely on dirname -PKNAME=`basename "$PKDEST"` -GFNAME=$NAME.${DPI}gf - -if test -r "$PKDESTDIR/$PKNAME"; then - echo "$progname: $PKDESTDIR/$PKNAME already exists." >&2 - echo "$PKDESTDIR/$PKNAME" >$STDOUT - "$MT_MKTEXUPD" "$PKDESTDIR" $PKNAME - exit 0 -fi - -"$MT_MKTEXDIR" "$PKDESTDIR" -if test ! -d "$PKDESTDIR"; then - echo "$progname: $MT_MKTEXDIR $PKDESTDIR failed." >&2 - exit 1 -fi - -echo "$progname: Running $cmd" -$cmd </dev/null || { - # Don't abort if only "Strange path", "bad pos" or "angle(0,0)" - # errors occurr. - grep '^!' $NAME.log | sort >$$.errs 2>/dev/null - grep '^! Strange path' $$.errs >$$.strange 2>/dev/null - grep '^! bad pos.' $$.errs >$$.badpos 2>/dev/null - grep '^! angle(0,0) is taken as zero.' $$.errs >$$.angle 2>/dev/null - cat $$.badpos $$.strange $$.angle | sort > $$.errs_accept - if cmp $$.errs $$.errs_accept >/dev/null 2>&1; then - test -s $$.strange >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused strange path errors." >&2 - test -s $$.badpos >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused bad pos errors." >&2 - test -s $$.angle >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused angle(0,0) errors." >&2 - else - echo "$progname: \`$cmd' failed." >&2 - test -s $NAME.log && mv -f $NAME.log "$KPSE_DOT" - exit 1; - fi -} - -test -r $GFNAME && { gftopk ./$GFNAME $PKNAME || exit 1; } -test ! -f $PKNAME && test -f $NAME.${DPI}pk && mv $NAME.${DPI}pk $PKNAME -if test ! -s $PKNAME; then - echo "$progname: \`$cmd' failed to make $PKNAME." >&2 - exit 1 -fi - -# Install the PK file carefully, since others may be working simultaneously. -# Use cp when mv fails, since DOS will fail mv for deeply-nested directories. -mv $PKNAME "$PKDESTDIR/pk$$.tmp" 2>/dev/null \ - || cp $PKNAME "$PKDESTDIR/pk$$.tmp" || exit 1 -cd "$PKDESTDIR" || exit 1 -chmod `kpsestat -xst,go-w .` pk$$.tmp -test -r $PKNAME || mv pk$$.tmp $PKNAME || exit 1 - -# Update ls-R if necessary. -"$MT_MKTEXUPD" "$PKDESTDIR" $PKNAME - -# If this line (or an equivalent) is not present, dvipsk/xdvik/dviljk -# will think mktexpk failed. Any other output to stdout will also lose. -echo "$PKDESTDIR/$PKNAME" >$STDOUT -echo "$progname: $PKDESTDIR/$PKNAME: successfully generated." >&2 -) 1>&2 </dev/null +../../texmf-dist/scripts/texlive/mktexpk
\ No newline at end of file diff --git a/Master/bin/x86_64-darwin/mktextfm b/Master/bin/x86_64-darwin/mktextfm index 46e30a9c5dc..70ae3a438ce 100755..120000 --- a/Master/bin/x86_64-darwin/mktextfm +++ b/Master/bin/x86_64-darwin/mktextfm @@ -1,162 +1 @@ -#!/bin/sh -# original mktextfm -- make a new TFM file, because one wasn't found. -# -# (If you change or delete the word `original' on the previous line, -# installation won't write this script over yours.) -# -# Primarily written by Thomas Esser, Karl Berry, and Olaf Weber. -# Public domain. - -version='$Id: mktextfm 34656 2014-07-18 23:38:50Z karl $' -progname=`echo $0 | sed 's%.*/%%'` - -# preferentially use subprograms from our own directory. -mydir=`echo "$0" | sed 's,/[^/]*$,,'` -mydir=`cd "$mydir" && pwd` -PATH="$mydir:$PATH"; export PATH - -usage="Usage: $progname [--destdir DESTDIR] FONT. - -Makes a TFM file for FONT, if possible. Use DESTDIR for the root of where -to install into, either the absolute directory name to use (if it starts -with a /) or relative to the default DESTDIR (if not). - -Report bugs to: tex-k@tug.org -TeX Live home page: <http://tug.org/texlive/> -" - -# Handle non-positional options, except for --version/--help -while test $# -gt 0; do - case "$1" in - --destdir) shift; DEST="$1"; shift ;; - --destdir=*) DEST=`echo "$1" | sed 's/--destdir=//'`; shift ;; - --version|-version) break ;; - --help|-help) break ;; - *) break ;; - esac -done - -# Common code for all scripts. -: ${MT_TEXMFMAIN=`kpsewhich --expand-path='$TEXMFMAIN'`} -: ${MT_MKTEX_OPT=`kpsewhich --format='web2c files' mktex.opt`} -test -n "$MT_MKTEX_OPT" || MT_MKTEX_OPT="$MT_TEXMFMAIN/web2c/mktex.opt" -if test ! -f "$MT_MKTEX_OPT"; then - echo "$progname: Cannot find mktex.opt; check your installation." >&2 - exit 1 -fi - -. "$MT_MKTEX_OPT" - -# Where do potential mf driver files go? -case "$MT_FEATURES" in - *nomfdrivers*) - : ${MT_MFDESTDIR=`pwd`} - export MT_MFDESTDIR;; -esac - -# start of redirection stdout -> stderr, stdin <- /dev/null -( - -NAME=`basename "$1" .tfm` -MAG=1 # mag=0 fails with larm1000.mf -#DEST="$2" -DPI=$BDPI - -OIFS=$IFS; IFS=$SEP -set x `"$MT_MKTEXNAM" $NAME $DPI $MODE $DEST`; shift -IFS=$OIFS - -PKDEST="$1" -TFMDEST="$2" -PKDESTDIR=`echo "$PKDEST" | sed 's%/[^/][^/]*$%%'` # can't rely on dirname -TFMDESTDIR=`echo "$TFMDEST" | sed 's%/[^/][^/]*$%%'` -PKNAME=`basename "$PKDEST"` -TFMNAME=$NAME.tfm -GFNAME=$NAME.$DPI'gf' - -if test -r "$TFMDESTDIR/$TFMNAME"; then - echo "$progname: $TFMDESTDIR/$TFMNAME already exists." >&2 - echo "$TFMDESTDIR/$TFMNAME" >$STDOUT - "$MT_MKTEXUPD" "$TFMDESTDIR" $TFMNAME - exit -fi - -# Try to create the destdir first. Do not create fonts, if this fails. -"$MT_MKTEXDIR" "$TFMDESTDIR" -if test ! -d "$TFMDESTDIR"; then - echo "$progname: mktexdir $TFMDESTDIR failed." - exit 1 -fi - -# Check if this font is supported by hbf2gf else use metafont. -if (hbf2gf -q -t $NAME) >/dev/null 2>&1; then - cmd="hbf2gf -g $NAME $DPI" -else - # determine the progname of metafont to use; prefer mf-nowin. - if (mf-nowin --version) >/dev/null 2>&1; then - MF="mf-nowin -progname=mf" - else - MF=mf - fi - - cmd="$MF \mode:=$MODE; mag:=$MAG; nonstopmode; input $NAME" -fi - -echo "$progname: Running $cmd" -$cmd </dev/null || { - # Don't abort if only "Strange path", "bad pos" or "angle(0,0)" - # errors occurr. - grep '^!' $NAME.log | sort >$$.errs 2>/dev/null - grep '^! Strange path' $$.errs >$$.strange 2>/dev/null - grep '^! bad pos.' $$.errs >$$.badpos 2>/dev/null - grep '^! angle(0,0) is taken as zero.' $$.errs >$$.angle 2>/dev/null - cat $$.badpos $$.strange $$.angle | sort > $$.errs_accept - if cmp $$.errs $$.errs_accept >/dev/null 2>&1; then - test -s $$.strange >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused strange path errors." >&2 - test -s $$.badpos >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused bad pos errors." >&2 - test -s $$.angle >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused angle(0,0) errors." >&2 - else - echo "$progname: \`$cmd' failed." >&2 - test -s $NAME.log && mv -f $NAME.log "$KPSE_DOT" - exit 1; - fi -} - -# hbf2gf just produces a .pl file: -test -r ./$NAME.pl && pltotf ./$NAME.pl $TFMNAME -test -r $TFMNAME || { echo "$progname: \`$cmd' failed to make $TFMNAME."; exit 1; } - -# Install the TFM file carefully, since others may be working simultaneously. -# Use cp when mv fails, since DOS will fail mv for deeply-nested directories. -mv $TFMNAME "$TFMDESTDIR/tfm$$.tmp" 2>/dev/null \ - || cp $TFMNAME "$TFMDESTDIR/tfm$$.tmp" || exit 1 -cd "$TFMDESTDIR" || exit 1 -chmod `kpsestat -xst,go-w .` tfm$$.tmp -test -r $TFMNAME || mv tfm$$.tmp $TFMNAME || exit 1 - -# OK, success with the TFM. -"$MT_MKTEXUPD" "$TFMDESTDIR" $TFMNAME -echo "$TFMDESTDIR/$TFMNAME" >$STDOUT -echo "$progname: $TFMDESTDIR/$TFMNAME: successfully generated." >&2 - -# Since we probably made a GF(->PK) file, too, may as well install it if -# it's needed. -cd $TEMPDIR -if test -r $GFNAME && test ! -f "$PKDESTDIR/$PKNAME"; then - gftopk ./$GFNAME $PKNAME || exit 1 - "$MT_MKTEXDIR" "$PKDESTDIR" - mv $PKNAME "$PKDESTDIR/pk$$.tmp" 2>/dev/null \ - || cp $PKNAME "$PKDESTDIR/pk$$.tmp" || exit 1 - cd "$PKDESTDIR" || exit 1 - if test -f $PKNAME; then - rm -f pk$$.tmp - else - chmod `kpsestat -xst,go-w .` pk$$.tmp - mv pk$$.tmp $PKNAME - "$MT_MKTEXUPD" "$PKDESTDIR" $PKNAME - fi -fi -) 1>&2 </dev/null +../../texmf-dist/scripts/texlive/mktextfm
\ No newline at end of file diff --git a/Master/bin/x86_64-darwinlegacy/mktexlsr b/Master/bin/x86_64-darwinlegacy/mktexlsr index 5fde39e2c2d..a36378a2b9f 100755..120000 --- a/Master/bin/x86_64-darwinlegacy/mktexlsr +++ b/Master/bin/x86_64-darwinlegacy/mktexlsr @@ -1,236 +1 @@ -#!/bin/sh -# original mktexlsr -- create or rebuild ls-R. -# -# (If you change or delete the word `original' on the previous line, -# installation won't write this script over yours.) -# -# Suitable for calling from cron, as in: -# 0 * * * * cd /your/texmf/root && /usr/local/texlive/bin/mktexlsr -# -# Originally written as `texhash' by Thomas Esser, Okt., 1994. -# Public domain. - -version='$Id: mktexlsr 46343 2018-01-17 00:55:32Z preining $' -progname=`echo $0 | sed 's%.*/%%'` - -usage="Usage: $progname [OPTION]... [DIR]... - -Rebuild ls-R filename databases used by TeX. If one or more arguments -DIRS are given, these are used as the directories in which to build -ls-R. Else all directories in the search path for ls-R files -(\$TEXMFDBS) are used. - -Options: - --dry-run do not actually update anything - --help display this help and exit - --quiet cancel --verbose - --silent same as --quiet - --verbose explain what is being done - --version output version information and exit - -If standard input is a terminal, --verbose is on by default. - -For more information, see the \`Filename database' section of -Kpathsea manual available at http://tug.org/kpathsea. - -Report bugs to: tex-k@tug.org -TeX Live home page: <http://tug.org/texlive/> -" - -# The simple PATH-prepending approach we take in other scripts doesn't -# handle DOS/Windows, but we don't use the shell scripts on Windows -# anyway, and does anyone want current TL on DOS or DJGPP? Maybe they -# can maintain their own changes if so. Leaving this code though, since -# it's always been here ... - -# MS-DOS and MS-Windows define $COMSPEC or $ComSpec and use `;' to separate -# directories in path lists whereas Unix uses `:'. Make an exception for -# Cygwin, which pretends to be UNIX. -# Create a variable that holds the right character to be used by the scripts. -DOSISH=no -case `uname -s` in - CYGWIN*|Cygwin*|cygwin*) ;; - *) if test -n "$COMSPEC" || test -n "$ComSpec"; then DOSISH=yes; fi -esac -if test "$DOSISH" = "no"; then SEP=':'; else SEP=';';fi - -# Add the location of the script to the PATH if necessary. This must -# be done before kpsewhich can be called, and thus cannot be put into -# mktex.opt. -dirname=`echo $0 | sed 's%/*[^/][^/]*$%%'` -case $dirname in - "") # Do nothing - ;; - /* | [A-z]:/*) # Absolute name - PATH="$dirname$SEP$PATH" - export PATH ;; - *) # Relative name - PATH="`pwd`/$dirname$SEP$PATH" - export PATH ;; -esac - -if tty -s; then verbose=true; else verbose=false; fi -dry_run=false -trees= - -# initialize treefile by either mktemp or some random name -# code taken from pdfjam and adjusted -{ - treefile=` - (umask 077 && mktemp "${TMPDIR-/tmp}/mktexlsrtrees.XXXXXXXXXX") 2>/dev/null - ` && test -n "$treefile" && test -f "$treefile" -} || { - ## We'll use awk to make random number, for portability - random=`awk 'END { srand(); printf ("%d\n", rand()*1000000); }' /dev/null` - treefile="${TMPDIR-/tmp}/mktexlsrtrees$$.$random" -} || exit $? - -trap 'cd /; rm -f $treefile; test -z "$db_dir_tmp" || rm -rf "$db_dir_tmp"; - exit' 0 1 2 3 7 13 15 - -# A copy of some stuff from mktex.opt, so we can run in the presence of -# terminally damaged ls-R files. -while test $# -gt 0; do - if test "x$1" = x--help || test "x$1" = x-help; then - echo "$usage" - exit 0 - elif test "x$1" = x--version || test "x$1" = x-version; then - echo "`basename $0` $version" - kpsewhich --version - exit 0 - elif test "x$1" = x--verbose || test "x$1" = x-verbose; then - verbose=true - elif test "x$1" = x--dry-run || test "x$1" = x-n; then - dry_run=true - elif test "x$1" = x--quiet || test "x$1" = x--silent \ - || test "x$1" = x-quiet || test "x$1" = x-silent ; then - verbose=false - elif test "x$1" = x--; then - : - elif echo "x$1" | grep '^x-' >/dev/null; then - echo "$progname: unknown option \`$1', try --help if you need it." >&2 - exit 1 - else - if test ! -d "$1"; then - echo "$progname: $1: not a directory, skipping." >&2 - shift - continue - fi - # By saving the argument in a file, we can later get it back while - # supporting spaces in the name. This still doesn't support - # newlines in the directory names, but nobody ever complains about - # that, and it seems much too much trouble to use \0 terminators. - (umask 077 - if echo "$1" >>"$treefile"; then :; else - echo "$progname: $treefile: could not append to arg file, goodbye." >&2 - exit 1 - fi - ) - fi - shift -done - -# mktexupd and mktexlsr make sure they're coordinated via this. A copy -# is found mktex.opt. -ls_R_magic='% ls-R -- filename database for kpathsea; do not change this line.' -# The old string, which should continue to work. -old_ls_R_magic='% ls-R -- maintained by MakeTeXls-R; do not change this line.' - -{ - # Get list of directories from the explicit arguments (now saved in - # $treefile), or $TEXMFDBS if no explicit args. Eliminate duplicates. - saveIFS=$IFS # break only at newline - IFS=' -' - if test -s "$treefile"; then - set x `sort "$treefile" | uniq` - else - set x `kpsewhich --show-path=ls-R | tr : ' -' | sort | uniq` - fi - IFS=$saveIFS - shift -} - -for TEXMFLS_R in "$@"; do - # Prepend cwd if the directory was relative. - case "$TEXMFLS_R" in - "") continue ;; # Strictly speaking, it is an error if this case is taken. - /* | [A-z]:/*) ;; - *) TEXMFLS_R="`pwd`/$TEXMFLS_R" - esac - # Allow for either ls-R and ls-r to exist. But create ls-R if we're - # working from scratch. - if test -f "$TEXMFLS_R/ls-R"; then - db_file="$TEXMFLS_R/ls-R" - elif test -f "$TEXMFLS_R/ls-r"; then - db_file="$TEXMFLS_R/ls-r" - else - db_file="$TEXMFLS_R/ls-R" - fi - # Follow a possible symlink to get the right filesystem. - # The '|| true' construct prevents an sh -e aborting. - db_readlink=`kpsereadlink "$TEXMFLS_R/ls-R" 2>/dev/null` || true - case "$db_readlink" in - "") ;; - /* | [A-z]:/*) db_file="$db_readlink" ;; - *) db_file="$TEXMFLS_R/$db_readlink" - esac - db_dir=`echo "$db_file" | sed 's%/[^/][^/]*$%%'` # can't rely on dirname - - # want to be silent if the directory doesn't exist, since the ls-R - # path ordinarily contains many nonexistent directories. - test -d "$db_dir" || continue - test -w "$db_dir" || { echo "$progname: $db_dir: directory not writable. Skipping..." >&2; continue; } - - if test ! -f "$db_file"; then - cp /dev/null "$db_file" - # Use same permissions as parent directory, minus x,s, or t bits. - chmod `kpsestat -xst "$db_dir"` "$db_file" - elif test -s "$db_file" \ - && test "x`sed '1s/
$//;1q' \"$db_file\"`" != "x$ls_R_magic" \ - && test "x`sed '1s/
$//;1q' \"$db_file\"`" != "x$old_ls_R_magic"; then - echo "$progname: $db_file: no magic string, skipping..." >&2 - continue - fi - - # Skip if we cannot write the file: - kpseaccess -w "$db_file" || { echo "$progname: $db_file: no write permission, skipping..." >&2; continue; } - - db_dir_tmp="$db_dir/lsR$$.tmp" - (umask 077 && mkdir "$db_dir_tmp" ) \ - || { echo "$progname: $db_dir_tmp: could not create directory, skipping..." >&2; continue; } - db_file_tmp="$db_dir_tmp/lsR$$.tmp" - rm -f "$db_file_tmp" - - $verbose && echo "$progname: Updating $db_file... " - $dry_run && continue - - echo "$ls_R_magic" >"$db_file_tmp" - - # The main task. We put ./: in the output, so top-level files can be - # found via ls-R. Probably irrelevant in practice. The sed command - # inserts the leading ./ for directory names, and removes ., .., and - # version control entries from the list. Also omit contents of any - # the version directories; sed apparently requires that we do that - # operation in a separate invocation. We do not try to support colons - # in directory names. - # - echo "./:" >>"$db_file_tmp" - vc_dirs='\.\(bzr\|git\|hg\|svn\)\|_darcs' - (cd "$TEXMFLS_R" && \ls -LRa 2>/dev/null) \ - | sed -e '/^$/{n;s%^\./%%;s%^%./%;}; /^\.$/d; /^\.\.$/d; /^'$vc_dirs'$/d;' \ - -e '/^[\.\/]*lsR[0-9]*\.tmp:*$/d' \ - | sed -e /$vc_dirs'.*:$/,/^$/d' \ - >>"$db_file_tmp" - - # To be really safe, a loop. - until PERMS=`kpsestat = "$db_file"`; do sleep 1; done - chmod $PERMS "$db_file_tmp" - rm -f "$db_file" - mv "$db_file_tmp" "$db_file" - rm -rf "$db_dir_tmp" -done - -$verbose && echo "$progname: Done." -exit 0 +../../texmf-dist/scripts/texlive/mktexlsr
\ No newline at end of file diff --git a/Master/bin/x86_64-darwinlegacy/mktexmf b/Master/bin/x86_64-darwinlegacy/mktexmf index bb868c12a8d..302c00f763e 100755..120000 --- a/Master/bin/x86_64-darwinlegacy/mktexmf +++ b/Master/bin/x86_64-darwinlegacy/mktexmf @@ -1,151 +1 @@ -#!/bin/sh -# original mktexmf -- make a new MF file, because one wasn't found. -# -# (If you change or delete the word `original' on the previous line, -# installation won't write this script over yours.) -# -# Originally written by Thomas Esser. -# Public domain. - -version='$Id: mktexmf 34656 2014-07-18 23:38:50Z karl $' - -# preferentially use subprograms from our own directory. -mydir=`echo "$0" | sed 's,/[^/]*$,,'` -mydir=`cd "$mydir" && pwd` -PATH="$mydir:$PATH"; export PATH - -usage="Usage: $0 FONT. - -Makes the Metafont source file for FONT, if possible. For example, -\`ecr12' or \`cmr11'. - -Report bugs to: tex-k@tug.org -TeX Live home page: <http://tug.org/texlive/> -" - -# Common code for all scripts. -: ${MT_TEXMFMAIN=`kpsewhich --expand-path='$TEXMFMAIN'`} -: ${MT_MKTEX_OPT=`kpsewhich --format='web2c files' mktex.opt`} -test -n "$MT_MKTEX_OPT" || MT_MKTEX_OPT="$MT_TEXMFMAIN/web2c/mktex.opt" -if test ! -f "$MT_MKTEX_OPT"; then - echo "$progname: Cannot find mktex.opt; check your installation." >&2 - exit 1 -fi - -. "$MT_MKTEX_OPT" - -( -# See comments in mktexpk. -name="`echo $1 | sed 's%.*/%%; s%\.mf$%%'`" -rootname=`echo "$name" | sed 's/[0-9]*$//'` -pointsize=`echo "$name" | sed "s/^$rootname//"` - -sauterroot=`kpsewhich b-$rootname.mf 2>/dev/null` -if test -n "$sauterroot"; then - rootfile=$sauterroot - rootname=b-$rootname -else - case $name in - # csso12[0-5][0-9] from CJK package; unsupported by mktexmf - csso12[0-5][0-9]) - rootfile=;; - *) - case $rootname in - cs*|lcsss*|icscsc*|icstt*|ilcsss*) - rootfile=`kpsewhich cscode.mf`;; - wn[bcdfirstuv]*|rx[bcdfiorstuvx][bcfhilmostx]|l[abcdhl][bcdfiorstuvx]*) - lhprefix=`echo "$name" | sed 's/^\(..\).*/\1/'` - rootfile=`kpsewhich ${lhprefix}codes.mf 2>/dev/null`;; - *) - rootfile=`kpsewhich $rootname.mf 2>/dev/null`;; - esac;; - esac -fi -{ test -z "$rootfile" || test ! -f "$rootfile"; } && exit 1 - -#if test -z "$MT_MFNAME"; then -OIFS=$IFS; IFS=$SEP -set x `"$MT_MKTEXNAM" $name`; shift -IFS=$OIFS -MT_MFNAME="$3" -#fi - -destdir=`echo "$MT_MFNAME" | sed 's%/[^/][^/]*$%%'` -test -d "$destdir" || "$MT_MKTEXDIR" "$destdir" || exit 1 -cd "$destdir" || exit 1 - -case "$pointsize" in - "") echo "$progname: no pointsize."; exit 1;; - 11) realsize=10.95;; # \magstephalf - 14) realsize=14.4;; # \magstep2 - 17) realsize=17.28;; # \magstep3 - 20) realsize=20.74;; # \magstep4 - 25) realsize=24.88;; # \magstep5 - 30) realsize=29.86;; # \magstep6 - 36) realsize=35.83;; # \magstep7 - # The new convention is to have three or four letters for the - # font name and four digits for the pointsize. The number is - # pointsize * 100. We effectively divide by 100 by ignoring the - # last two digits. - ????|?????) realsize=`echo "$pointsize" | sed 's/\(..\)$/.\1/'`;; - *) realsize="$pointsize";; -esac - -mfname="$name.mf" -if test -r "$mfname"; then - echo "$progname: $destdir/$mfname already exists." - echo "$destdir/$mfname" >$STDOUT - "$MT_MKTEXUPD" "$destdir" "$mfname" - exit 0 -fi - -case "$name" in - ec*|tc*) - cat > "mf$$.tmp" <<END -if unknown exbase: input exbase fi; -gensize:=$realsize; -generate $rootname; -END - ;; - dc*) - cat > "mf$$.tmp" <<END -if unknown dxbase: input dxbase fi; -gensize:=$realsize; -generate $rootname; -END - ;; - cs*|lcsss*|icscsc*|icstt*|ilcsss*) - cat > "mf$$.tmp" <<END -input cscode -use_driver; -END - ;; - wn[bcdfirstuv]*|rx[bcdfiorstuvx][bcfhilmostx]*|l[abcdhl][bcdfiorstuvx]*) - cat > "mf$$.tmp" <<END -input fikparm; -END - ;; - g[lmorst][bijmtwx][cilnoru]*) - # A small superset of the names of the cbgreek fonts. - cat > "mf$$.tmp" <<END -% generated by mktexmf -input cbgreek; -END - ;; - *) - cat > "mf$$.tmp" <<END -design_size := $realsize; -input $rootname; -END - ;; -esac - -chmod `kpsestat -xst,go-w .` "mf$$.tmp" -rm -f "$mfname" -mv "mf$$.tmp" "$mfname" - -echo "$destdir/$mfname" >$STDOUT -echo "$progname: $destdir/$mfname: successfully generated." >&2 -"$MT_MKTEXUPD" "$destdir" "$mfname" -exit 0 -) 1>&2 </dev/null +../../texmf-dist/scripts/texlive/mktexmf
\ No newline at end of file diff --git a/Master/bin/x86_64-darwinlegacy/mktexpk b/Master/bin/x86_64-darwinlegacy/mktexpk index 2672dc7f78c..a0d6db0121b 100755..120000 --- a/Master/bin/x86_64-darwinlegacy/mktexpk +++ b/Master/bin/x86_64-darwinlegacy/mktexpk @@ -1,284 +1 @@ -#!/bin/sh -# original mktexpk -- make a new PK font, because one wasn't found. -# -# (If you change or delete the word `original' on the previous line, -# installation won't write this script over yours.) -# -# Originally written by Thomas Esser, Karl Berry, and Olaf Weber. -# Public domain. - -version='$Id: mktexpk 34656 2014-07-18 23:38:50Z karl $' -progname=`echo $0 | sed 's%.*/%%'` - -# preferentially use subprograms from our own directory. -mydir=`echo "$0" | sed 's,/[^/]*$,,'` -mydir=`cd "$mydir" && pwd` -PATH="$mydir:$PATH"; export PATH - -usage="Usage: $progname [OPTIONS] NAME [REDIRECT], - Create a PK font. - ---dpi DPI use resolution DPI. ---bdpi BDPI use base resolution BDPI. ---mag MAG use magnificiation MAG. ---mfmode MODE use MODE as the METAFONT mode. ---destdir DESTDIR write fonts in DESTDIR. - -Try to create a bitmap PK file for NAME at resolution DPI, with an -assumed device base resolution of BDPI, and a Metafont \`mag' of -MAG. Use MODE for the METAFONT mode. Use DESTDIR for the root of where -to install into, either the absolute directory name to use (if it starts -with a /) or relative to the default DESTDIR (if not). REDIRECT, if -supplied, is a string of the form '>&n', where n is the number of the -file descriptor which is to receive, instead of stdout, the name of the -newly created pk file. - -If you expected the font to be available as an outline, and thus this -script does not work and should not have been called, most likely the -font's .tfm name is missing from the relevant map file (e.g., -psfonts.map for dvips, pdftex.map for pdftex). These map files are -typically maintained using updmap; q.v. - -For step-by-step instructions on making new fonts known to TeX, see -http://tug.org/fonts/fontinstall.html. - -Report bugs to: tex-k@tug.org -TeX Live home page: <http://tug.org/texlive/> -" - -# Handle non-positional options, except for --version/--help -while test $# -gt 0; do - case "$1" in - --destdir) shift; DEST="$1"; shift ;; - --destdir=*) DEST=`echo "$1" | sed 's/--destdir=//'`; shift ;; - --dpi) shift; DPI="$1"; shift ;; - --dpi=*) DPI=`echo "$1" | sed 's/--dpi=//'`; shift ;; - --bdpi) shift; BDPI="$1"; shift ;; - --bdpi=*) BDPI=`echo "$1" | sed 's/--bdpi=//'`; shift ;; - --mfmode) shift; test "x$1" != "x/" && MODE="$1"; shift ;; - --mfmode=*) test "x$1" != "x--mfmode/" \ - && MODE=`echo "$1" | sed 's/--mfmode=//'`; shift ;; - --mag) shift; MAG="$1"; shift;; - --mag=*) MAG=`echo "$1" | sed '/s--mag=//'`; shift;; - --version|-version) break ;; - --help|-help) break ;; - *) break ;; - esac -done - -if test "x$2" != x; then - tail="`echo \"x$2\" | sed 's/^x>&//' | grep '^[0-9]*$'`" - if test -z "$tail"; then - echo "$progname: argument '$2' ignored - bad file number" >&2 - elif test "$tail" != 1; then - eval 'exec 1>&$tail' - fi -fi - -mt_max_args=2 - -# Common code for all scripts. -: ${MT_TEXMFMAIN=`kpsewhich --expand-path='$TEXMFMAIN'`} -: ${MT_MKTEX_OPT=`kpsewhich --format='web2c files' mktex.opt`} -test -n "$MT_MKTEX_OPT" || MT_MKTEX_OPT="$MT_TEXMFMAIN/web2c/mktex.opt" -if test ! -f "$MT_MKTEX_OPT"; then - echo "$progname: Cannot find mktex.opt; check your installation." >&2 - exit 1 -fi - -. "$MT_MKTEX_OPT" - -# Where do potential driver files belong? -case "$MT_FEATURES" in - *nomfdrivers*) - : ${MT_MFDESTDIR=`pwd`} - export MT_MFDESTDIR;; -esac - -# Since we want to pass the generated filename and only that filename -# back to the caller on standard output, we do some redirections so -# regular echo's will end up on stderr, and do an echo >$STDOUT at the end. -# Then the contents of $STDOUT will be echoed to stdout by a trap. - -# start of redirection stdout -> stderr, stdin <- /dev/null -( - -NAME=$1 - -if kpsewhich $NAME.mf >/dev/null 2>&1 || mktexmf $NAME >/dev/null 2>&1; then - # determine the progname of metafont to use; prefer mf-nowin. - if (mf-nowin --version) >/dev/null 2>&1; then - MF="mf-nowin -progname=mf" - else - MF=mf - fi - - # Check that $BDPI and $MODE are consistent; if not, ignore the mode and - # hope we can correctly guess it from bdpi. (People like to specify the - # resolution on the command line, not the mode so much.) - if test -n "$MODE"; then - mf_bdpi=`$MF \ -'\mode:='$MODE';mode_setup;message"BDPI= "&decimal round pixels_per_inch;end.'\ - </dev/null \ - | awk '/DPI=/ {print $2}'` - if test "x$mf_bdpi" != x$BDPI; then - echo "$progname: Mismatched mode $MODE and resolution $BDPI; ignoring mode." >&2 - MODE= - fi - fi - - # If an explicit mode is not supplied, try to guess. You can get a - # list of extant modes from ftp://ftp.tug.org/tex/modes.mf. - if test -z "$MODE" || test "x$MODE" = xdefault; then - case "$BDPI" in - 85) MODE=sun;; - 100) MODE=nextscrn;; - 180) MODE=toshiba;; - 300) MODE=cx;; - 360) MODE=epstylus;; - 400) MODE=nexthi;; - 600) MODE=ljfour;; - 720) MODE=epscszz;; - 1200) MODE=ultre;; - 1270) MODE=linoone;; - 8000) MODE=dpdfezzz;; - *) echo "$progname: Can't guess mode for $BDPI dpi devices." >&2 - echo "$progname: Use a config file or option to specify the mode; see:" >&2 - echo "$progname: http://tug.org/texinfohtml/kpathsea.html#Unable-to-generate-fonts" >&2 - exit 1 - esac - fi - - # Run Metafont. Always use plain Metafont, since reading cmbase.mf - # does not noticeably slow things down. - cmd="$MF \mode:=$MODE; mag:=$MAG; nonstopmode; input $NAME" -else - MODE=modeless - # ps_to_pk is set in mktex.opt - case $ps_to_pk in - gsftopk) - if $ps_to_pk -t "$NAME"; then - cmd="$ps_to_pk $NAME $DPI" - fi;; - ps2pk) - # grep for the font in $PSMAPFILE. These are base font names, such as - # rpplr (the original) or pplr0 (an interim step) or pplr8r (current). - : ${PSMAPFILE=`kpsewhich --format=map psfonts.map ps2pk.map`} - pattern="^$NAME"'([ ]|$)' - psline=`egrep "$pattern" $PSMAPFILE | tail -1` - if test -n "$psline"; then - set x `echo "$psline" | sed 's%[<["]%%g'` - shift; shift; shift; - encoding=; psname=; slant=; extend= - while test ! -z "$1"; do - case "$1" in - *.enc) encoding="-e $1";; - *.pf[ab]) psname="$1";; - *SlantFont) slant="-S $lastopt";; - *ExtendFont) extend="-E $lastopt";; - esac - lastopt="$1" - shift - done - # Guessing the name of the type1 font file as fallback: - ANAME=`echo $NAME | sed 's/8r$/8a/'` - for i in $NAME.pfa $NAME.pfb $ANAME.pfa $ANAME.pfb; do - if kpsewhich $i >/dev/null 2>&1; then - psname=$i - break - fi - done - - if [ -n "$psname" ]; then - cmd="ps2pk -v -X$DPI -R$BDPI $slant $extend $encoding $psname $NAME.${DPI}pk" - else - if gsftopk -t "$NAME"; then - echo "$progname: cannot find $NAME.pfa or $NAME.pfb. Trying gsftopk." >&2 - cmd="gsftopk $NAME $DPI" - fi - fi - fi;; - esac - - # unsupported by $ps_to_pk, try other conversions: - if test -z "$cmd"; then - if (ttf2pk -t -q $NAME) >/dev/null 2>&1; then - cmd="ttf2pk -q $NAME $DPI" - elif (hbf2gf -t -q $NAME) >/dev/null 2>&1; then - cmd="hbf2gf -q -p $NAME $DPI" - else - echo "$progname: don't know how to create bitmap font for $NAME." >&2 - echo "$progname: perhaps $NAME is missing from the map file." >&2 - exit 1 - fi - fi -fi - -OIFS=$IFS; IFS=$SEP -set x `"$MT_MKTEXNAM" $NAME $DPI $MODE $DEST`; shift -IFS=$OIFS - -PKDEST="$1" -PKDESTDIR=`echo "$PKDEST" | sed 's%/[^/][^/]*$%%'` # can't rely on dirname -PKNAME=`basename "$PKDEST"` -GFNAME=$NAME.${DPI}gf - -if test -r "$PKDESTDIR/$PKNAME"; then - echo "$progname: $PKDESTDIR/$PKNAME already exists." >&2 - echo "$PKDESTDIR/$PKNAME" >$STDOUT - "$MT_MKTEXUPD" "$PKDESTDIR" $PKNAME - exit 0 -fi - -"$MT_MKTEXDIR" "$PKDESTDIR" -if test ! -d "$PKDESTDIR"; then - echo "$progname: $MT_MKTEXDIR $PKDESTDIR failed." >&2 - exit 1 -fi - -echo "$progname: Running $cmd" -$cmd </dev/null || { - # Don't abort if only "Strange path", "bad pos" or "angle(0,0)" - # errors occurr. - grep '^!' $NAME.log | sort >$$.errs 2>/dev/null - grep '^! Strange path' $$.errs >$$.strange 2>/dev/null - grep '^! bad pos.' $$.errs >$$.badpos 2>/dev/null - grep '^! angle(0,0) is taken as zero.' $$.errs >$$.angle 2>/dev/null - cat $$.badpos $$.strange $$.angle | sort > $$.errs_accept - if cmp $$.errs $$.errs_accept >/dev/null 2>&1; then - test -s $$.strange >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused strange path errors." >&2 - test -s $$.badpos >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused bad pos errors." >&2 - test -s $$.angle >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused angle(0,0) errors." >&2 - else - echo "$progname: \`$cmd' failed." >&2 - test -s $NAME.log && mv -f $NAME.log "$KPSE_DOT" - exit 1; - fi -} - -test -r $GFNAME && { gftopk ./$GFNAME $PKNAME || exit 1; } -test ! -f $PKNAME && test -f $NAME.${DPI}pk && mv $NAME.${DPI}pk $PKNAME -if test ! -s $PKNAME; then - echo "$progname: \`$cmd' failed to make $PKNAME." >&2 - exit 1 -fi - -# Install the PK file carefully, since others may be working simultaneously. -# Use cp when mv fails, since DOS will fail mv for deeply-nested directories. -mv $PKNAME "$PKDESTDIR/pk$$.tmp" 2>/dev/null \ - || cp $PKNAME "$PKDESTDIR/pk$$.tmp" || exit 1 -cd "$PKDESTDIR" || exit 1 -chmod `kpsestat -xst,go-w .` pk$$.tmp -test -r $PKNAME || mv pk$$.tmp $PKNAME || exit 1 - -# Update ls-R if necessary. -"$MT_MKTEXUPD" "$PKDESTDIR" $PKNAME - -# If this line (or an equivalent) is not present, dvipsk/xdvik/dviljk -# will think mktexpk failed. Any other output to stdout will also lose. -echo "$PKDESTDIR/$PKNAME" >$STDOUT -echo "$progname: $PKDESTDIR/$PKNAME: successfully generated." >&2 -) 1>&2 </dev/null +../../texmf-dist/scripts/texlive/mktexpk
\ No newline at end of file diff --git a/Master/bin/x86_64-darwinlegacy/mktextfm b/Master/bin/x86_64-darwinlegacy/mktextfm index 46e30a9c5dc..70ae3a438ce 100755..120000 --- a/Master/bin/x86_64-darwinlegacy/mktextfm +++ b/Master/bin/x86_64-darwinlegacy/mktextfm @@ -1,162 +1 @@ -#!/bin/sh -# original mktextfm -- make a new TFM file, because one wasn't found. -# -# (If you change or delete the word `original' on the previous line, -# installation won't write this script over yours.) -# -# Primarily written by Thomas Esser, Karl Berry, and Olaf Weber. -# Public domain. - -version='$Id: mktextfm 34656 2014-07-18 23:38:50Z karl $' -progname=`echo $0 | sed 's%.*/%%'` - -# preferentially use subprograms from our own directory. -mydir=`echo "$0" | sed 's,/[^/]*$,,'` -mydir=`cd "$mydir" && pwd` -PATH="$mydir:$PATH"; export PATH - -usage="Usage: $progname [--destdir DESTDIR] FONT. - -Makes a TFM file for FONT, if possible. Use DESTDIR for the root of where -to install into, either the absolute directory name to use (if it starts -with a /) or relative to the default DESTDIR (if not). - -Report bugs to: tex-k@tug.org -TeX Live home page: <http://tug.org/texlive/> -" - -# Handle non-positional options, except for --version/--help -while test $# -gt 0; do - case "$1" in - --destdir) shift; DEST="$1"; shift ;; - --destdir=*) DEST=`echo "$1" | sed 's/--destdir=//'`; shift ;; - --version|-version) break ;; - --help|-help) break ;; - *) break ;; - esac -done - -# Common code for all scripts. -: ${MT_TEXMFMAIN=`kpsewhich --expand-path='$TEXMFMAIN'`} -: ${MT_MKTEX_OPT=`kpsewhich --format='web2c files' mktex.opt`} -test -n "$MT_MKTEX_OPT" || MT_MKTEX_OPT="$MT_TEXMFMAIN/web2c/mktex.opt" -if test ! -f "$MT_MKTEX_OPT"; then - echo "$progname: Cannot find mktex.opt; check your installation." >&2 - exit 1 -fi - -. "$MT_MKTEX_OPT" - -# Where do potential mf driver files go? -case "$MT_FEATURES" in - *nomfdrivers*) - : ${MT_MFDESTDIR=`pwd`} - export MT_MFDESTDIR;; -esac - -# start of redirection stdout -> stderr, stdin <- /dev/null -( - -NAME=`basename "$1" .tfm` -MAG=1 # mag=0 fails with larm1000.mf -#DEST="$2" -DPI=$BDPI - -OIFS=$IFS; IFS=$SEP -set x `"$MT_MKTEXNAM" $NAME $DPI $MODE $DEST`; shift -IFS=$OIFS - -PKDEST="$1" -TFMDEST="$2" -PKDESTDIR=`echo "$PKDEST" | sed 's%/[^/][^/]*$%%'` # can't rely on dirname -TFMDESTDIR=`echo "$TFMDEST" | sed 's%/[^/][^/]*$%%'` -PKNAME=`basename "$PKDEST"` -TFMNAME=$NAME.tfm -GFNAME=$NAME.$DPI'gf' - -if test -r "$TFMDESTDIR/$TFMNAME"; then - echo "$progname: $TFMDESTDIR/$TFMNAME already exists." >&2 - echo "$TFMDESTDIR/$TFMNAME" >$STDOUT - "$MT_MKTEXUPD" "$TFMDESTDIR" $TFMNAME - exit -fi - -# Try to create the destdir first. Do not create fonts, if this fails. -"$MT_MKTEXDIR" "$TFMDESTDIR" -if test ! -d "$TFMDESTDIR"; then - echo "$progname: mktexdir $TFMDESTDIR failed." - exit 1 -fi - -# Check if this font is supported by hbf2gf else use metafont. -if (hbf2gf -q -t $NAME) >/dev/null 2>&1; then - cmd="hbf2gf -g $NAME $DPI" -else - # determine the progname of metafont to use; prefer mf-nowin. - if (mf-nowin --version) >/dev/null 2>&1; then - MF="mf-nowin -progname=mf" - else - MF=mf - fi - - cmd="$MF \mode:=$MODE; mag:=$MAG; nonstopmode; input $NAME" -fi - -echo "$progname: Running $cmd" -$cmd </dev/null || { - # Don't abort if only "Strange path", "bad pos" or "angle(0,0)" - # errors occurr. - grep '^!' $NAME.log | sort >$$.errs 2>/dev/null - grep '^! Strange path' $$.errs >$$.strange 2>/dev/null - grep '^! bad pos.' $$.errs >$$.badpos 2>/dev/null - grep '^! angle(0,0) is taken as zero.' $$.errs >$$.angle 2>/dev/null - cat $$.badpos $$.strange $$.angle | sort > $$.errs_accept - if cmp $$.errs $$.errs_accept >/dev/null 2>&1; then - test -s $$.strange >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused strange path errors." >&2 - test -s $$.badpos >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused bad pos errors." >&2 - test -s $$.angle >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused angle(0,0) errors." >&2 - else - echo "$progname: \`$cmd' failed." >&2 - test -s $NAME.log && mv -f $NAME.log "$KPSE_DOT" - exit 1; - fi -} - -# hbf2gf just produces a .pl file: -test -r ./$NAME.pl && pltotf ./$NAME.pl $TFMNAME -test -r $TFMNAME || { echo "$progname: \`$cmd' failed to make $TFMNAME."; exit 1; } - -# Install the TFM file carefully, since others may be working simultaneously. -# Use cp when mv fails, since DOS will fail mv for deeply-nested directories. -mv $TFMNAME "$TFMDESTDIR/tfm$$.tmp" 2>/dev/null \ - || cp $TFMNAME "$TFMDESTDIR/tfm$$.tmp" || exit 1 -cd "$TFMDESTDIR" || exit 1 -chmod `kpsestat -xst,go-w .` tfm$$.tmp -test -r $TFMNAME || mv tfm$$.tmp $TFMNAME || exit 1 - -# OK, success with the TFM. -"$MT_MKTEXUPD" "$TFMDESTDIR" $TFMNAME -echo "$TFMDESTDIR/$TFMNAME" >$STDOUT -echo "$progname: $TFMDESTDIR/$TFMNAME: successfully generated." >&2 - -# Since we probably made a GF(->PK) file, too, may as well install it if -# it's needed. -cd $TEMPDIR -if test -r $GFNAME && test ! -f "$PKDESTDIR/$PKNAME"; then - gftopk ./$GFNAME $PKNAME || exit 1 - "$MT_MKTEXDIR" "$PKDESTDIR" - mv $PKNAME "$PKDESTDIR/pk$$.tmp" 2>/dev/null \ - || cp $PKNAME "$PKDESTDIR/pk$$.tmp" || exit 1 - cd "$PKDESTDIR" || exit 1 - if test -f $PKNAME; then - rm -f pk$$.tmp - else - chmod `kpsestat -xst,go-w .` pk$$.tmp - mv pk$$.tmp $PKNAME - "$MT_MKTEXUPD" "$PKDESTDIR" $PKNAME - fi -fi -) 1>&2 </dev/null +../../texmf-dist/scripts/texlive/mktextfm
\ No newline at end of file diff --git a/Master/bin/x86_64-linux/mktexlsr b/Master/bin/x86_64-linux/mktexlsr index bd3eb50d6e4..a36378a2b9f 100755..120000 --- a/Master/bin/x86_64-linux/mktexlsr +++ b/Master/bin/x86_64-linux/mktexlsr @@ -1,236 +1 @@ -#!/bin/sh -# original mktexlsr -- create or rebuild ls-R. -# -# (If you change or delete the word `original' on the previous line, -# installation won't write this script over yours.) -# -# Suitable for calling from cron, as in: -# 0 * * * * cd /your/texmf/root && /usr/local/texlive/bin/mktexlsr -# -# Originally written as `texhash' by Thomas Esser, Okt., 1994. -# Public domain. - -version='$Id$' -progname=`echo $0 | sed 's%.*/%%'` - -usage="Usage: $progname [OPTION]... [DIR]... - -Rebuild ls-R filename databases used by TeX. If one or more arguments -DIRS are given, these are used as the directories in which to build -ls-R. Else all directories in the search path for ls-R files -(\$TEXMFDBS) are used. - -Options: - --dry-run do not actually update anything - --help display this help and exit - --quiet cancel --verbose - --silent same as --quiet - --verbose explain what is being done - --version output version information and exit - -If standard input is a terminal, --verbose is on by default. - -For more information, see the \`Filename database' section of -Kpathsea manual available at http://tug.org/kpathsea. - -Report bugs to: tex-k@tug.org -TeX Live home page: <http://tug.org/texlive/> -" - -# The simple PATH-prepending approach we take in other scripts doesn't -# handle DOS/Windows, but we don't use the shell scripts on Windows -# anyway, and does anyone want current TL on DOS or DJGPP? Maybe they -# can maintain their own changes if so. Leaving this code though, since -# it's always been here ... - -# MS-DOS and MS-Windows define $COMSPEC or $ComSpec and use `;' to separate -# directories in path lists whereas Unix uses `:'. Make an exception for -# Cygwin, which pretends to be UNIX. -# Create a variable that holds the right character to be used by the scripts. -DOSISH=no -case `uname -s` in - CYGWIN*|Cygwin*|cygwin*) ;; - *) if test -n "$COMSPEC" || test -n "$ComSpec"; then DOSISH=yes; fi -esac -if test "$DOSISH" = "no"; then SEP=':'; else SEP=';';fi - -# Add the location of the script to the PATH if necessary. This must -# be done before kpsewhich can be called, and thus cannot be put into -# mktex.opt. -dirname=`echo $0 | sed 's%/*[^/][^/]*$%%'` -case $dirname in - "") # Do nothing - ;; - /* | [A-z]:/*) # Absolute name - PATH="$dirname$SEP$PATH" - export PATH ;; - *) # Relative name - PATH="`pwd`/$dirname$SEP$PATH" - export PATH ;; -esac - -if tty -s; then verbose=true; else verbose=false; fi -dry_run=false -trees= - -# initialize treefile by either mktemp or some random name -# code taken from pdfjam and adjusted -{ - treefile=` - (umask 077 && mktemp "${TMPDIR-/tmp}/mktexlsrtrees.XXXXXXXXXX") 2>/dev/null - ` && test -n "$treefile" && test -f "$treefile" -} || { - ## We'll use awk to make random number, for portability - random=`awk 'END { srand(); printf ("%d\n", rand()*1000000); }' /dev/null` - treefile="${TMPDIR-/tmp}/mktexlsrtrees$$.$random" -} || exit $? - -trap 'cd /; rm -f $treefile; test -z "$db_dir_tmp" || rm -rf "$db_dir_tmp"; - exit' 0 1 2 3 7 13 15 - -# A copy of some stuff from mktex.opt, so we can run in the presence of -# terminally damaged ls-R files. -while test $# -gt 0; do - if test "x$1" = x--help || test "x$1" = x-help; then - echo "$usage" - exit 0 - elif test "x$1" = x--version || test "x$1" = x-version; then - echo "`basename $0` $version" - kpsewhich --version - exit 0 - elif test "x$1" = x--verbose || test "x$1" = x-verbose; then - verbose=true - elif test "x$1" = x--dry-run || test "x$1" = x-n; then - dry_run=true - elif test "x$1" = x--quiet || test "x$1" = x--silent \ - || test "x$1" = x-quiet || test "x$1" = x-silent ; then - verbose=false - elif test "x$1" = x--; then - : - elif echo "x$1" | grep '^x-' >/dev/null; then - echo "$progname: unknown option \`$1', try --help if you need it." >&2 - exit 1 - else - if test ! -d "$1"; then - echo "$progname: $1: not a directory, skipping." >&2 - shift - continue - fi - # By saving the argument in a file, we can later get it back while - # supporting spaces in the name. This still doesn't support - # newlines in the directory names, but nobody ever complains about - # that, and it seems much too much trouble to use \0 terminators. - (umask 077 - if echo "$1" >>"$treefile"; then :; else - echo "$progname: $treefile: could not append to arg file, goodbye." >&2 - exit 1 - fi - ) - fi - shift -done - -# mktexupd and mktexlsr make sure they're coordinated via this. A copy -# is found mktex.opt. -ls_R_magic='% ls-R -- filename database for kpathsea; do not change this line.' -# The old string, which should continue to work. -old_ls_R_magic='% ls-R -- maintained by MakeTeXls-R; do not change this line.' - -{ - # Get list of directories from the explicit arguments (now saved in - # $treefile), or $TEXMFDBS if no explicit args. Eliminate duplicates. - saveIFS=$IFS # break only at newline - IFS=' -' - if test -s "$treefile"; then - set x `sort "$treefile" | uniq` - else - set x `kpsewhich --show-path=ls-R | tr : ' -' | sort | uniq` - fi - IFS=$saveIFS - shift -} - -for TEXMFLS_R in "$@"; do - # Prepend cwd if the directory was relative. - case "$TEXMFLS_R" in - "") continue ;; # Strictly speaking, it is an error if this case is taken. - /* | [A-z]:/*) ;; - *) TEXMFLS_R="`pwd`/$TEXMFLS_R" - esac - # Allow for either ls-R and ls-r to exist. But create ls-R if we're - # working from scratch. - if test -f "$TEXMFLS_R/ls-R"; then - db_file="$TEXMFLS_R/ls-R" - elif test -f "$TEXMFLS_R/ls-r"; then - db_file="$TEXMFLS_R/ls-r" - else - db_file="$TEXMFLS_R/ls-R" - fi - # Follow a possible symlink to get the right filesystem. - # The '|| true' construct prevents an sh -e aborting. - db_readlink=`kpsereadlink "$TEXMFLS_R/ls-R" 2>/dev/null` || true - case "$db_readlink" in - "") ;; - /* | [A-z]:/*) db_file="$db_readlink" ;; - *) db_file="$TEXMFLS_R/$db_readlink" - esac - db_dir=`echo "$db_file" | sed 's%/[^/][^/]*$%%'` # can't rely on dirname - - # want to be silent if the directory doesn't exist, since the ls-R - # path ordinarily contains many nonexistent directories. - test -d "$db_dir" || continue - test -w "$db_dir" || { echo "$progname: $db_dir: directory not writable. Skipping..." >&2; continue; } - - if test ! -f "$db_file"; then - cp /dev/null "$db_file" - # Use same permissions as parent directory, minus x,s, or t bits. - chmod `kpsestat -xst "$db_dir"` "$db_file" - elif test -s "$db_file" \ - && test "x`sed '1s/
$//;1q' \"$db_file\"`" != "x$ls_R_magic" \ - && test "x`sed '1s/
$//;1q' \"$db_file\"`" != "x$old_ls_R_magic"; then - echo "$progname: $db_file: no magic string, skipping..." >&2 - continue - fi - - # Skip if we cannot write the file: - kpseaccess -w "$db_file" || { echo "$progname: $db_file: no write permission, skipping..." >&2; continue; } - - db_dir_tmp="$db_dir/lsR$$.tmp" - (umask 077 && mkdir "$db_dir_tmp" ) \ - || { echo "$progname: $db_dir_tmp: could not create directory, skipping..." >&2; continue; } - db_file_tmp="$db_dir_tmp/lsR$$.tmp" - rm -f "$db_file_tmp" - - $verbose && echo "$progname: Updating $db_file... " - $dry_run && continue - - echo "$ls_R_magic" >"$db_file_tmp" - - # The main task. We put ./: in the output, so top-level files can be - # found via ls-R. Probably irrelevant in practice. The sed command - # inserts the leading ./ for directory names, and removes ., .., and - # version control entries from the list. Also omit contents of any - # the version directories; sed apparently requires that we do that - # operation in a separate invocation. We do not try to support colons - # in directory names. - # - echo "./:" >>"$db_file_tmp" - vc_dirs='\.\(bzr\|git\|hg\|svn\)\|_darcs' - (cd "$TEXMFLS_R" && \ls -LRa 2>/dev/null) \ - | sed -e '/^$/{n;s%^\./%%;s%^%./%;}; /^\.$/d; /^\.\.$/d; /^'$vc_dirs'$/d;' \ - -e '/^[\.\/]*lsR[0-9]*\.tmp:*$/d' \ - | sed -e /$vc_dirs'.*:$/,/^$/d' \ - >>"$db_file_tmp" - - # To be really safe, a loop. - until PERMS=`kpsestat = "$db_file"`; do sleep 1; done - chmod $PERMS "$db_file_tmp" - rm -f "$db_file" - mv "$db_file_tmp" "$db_file" - rm -rf "$db_dir_tmp" -done - -$verbose && echo "$progname: Done." -exit 0 +../../texmf-dist/scripts/texlive/mktexlsr
\ No newline at end of file diff --git a/Master/bin/x86_64-linux/mktexmf b/Master/bin/x86_64-linux/mktexmf index f6b8991e8d1..302c00f763e 100755..120000 --- a/Master/bin/x86_64-linux/mktexmf +++ b/Master/bin/x86_64-linux/mktexmf @@ -1,151 +1 @@ -#!/bin/sh -# original mktexmf -- make a new MF file, because one wasn't found. -# -# (If you change or delete the word `original' on the previous line, -# installation won't write this script over yours.) -# -# Originally written by Thomas Esser. -# Public domain. - -version='$Id$' - -# preferentially use subprograms from our own directory. -mydir=`echo "$0" | sed 's,/[^/]*$,,'` -mydir=`cd "$mydir" && pwd` -PATH="$mydir:$PATH"; export PATH - -usage="Usage: $0 FONT. - -Makes the Metafont source file for FONT, if possible. For example, -\`ecr12' or \`cmr11'. - -Report bugs to: tex-k@tug.org -TeX Live home page: <http://tug.org/texlive/> -" - -# Common code for all scripts. -: ${MT_TEXMFMAIN=`kpsewhich --expand-path='$TEXMFMAIN'`} -: ${MT_MKTEX_OPT=`kpsewhich --format='web2c files' mktex.opt`} -test -n "$MT_MKTEX_OPT" || MT_MKTEX_OPT="$MT_TEXMFMAIN/web2c/mktex.opt" -if test ! -f "$MT_MKTEX_OPT"; then - echo "$progname: Cannot find mktex.opt; check your installation." >&2 - exit 1 -fi - -. "$MT_MKTEX_OPT" - -( -# See comments in mktexpk. -name="`echo $1 | sed 's%.*/%%; s%\.mf$%%'`" -rootname=`echo "$name" | sed 's/[0-9]*$//'` -pointsize=`echo "$name" | sed "s/^$rootname//"` - -sauterroot=`kpsewhich b-$rootname.mf 2>/dev/null` -if test -n "$sauterroot"; then - rootfile=$sauterroot - rootname=b-$rootname -else - case $name in - # csso12[0-5][0-9] from CJK package; unsupported by mktexmf - csso12[0-5][0-9]) - rootfile=;; - *) - case $rootname in - cs*|lcsss*|icscsc*|icstt*|ilcsss*) - rootfile=`kpsewhich cscode.mf`;; - wn[bcdfirstuv]*|rx[bcdfiorstuvx][bcfhilmostx]|l[abcdhl][bcdfiorstuvx]*) - lhprefix=`echo "$name" | sed 's/^\(..\).*/\1/'` - rootfile=`kpsewhich ${lhprefix}codes.mf 2>/dev/null`;; - *) - rootfile=`kpsewhich $rootname.mf 2>/dev/null`;; - esac;; - esac -fi -{ test -z "$rootfile" || test ! -f "$rootfile"; } && exit 1 - -#if test -z "$MT_MFNAME"; then -OIFS=$IFS; IFS=$SEP -set x `"$MT_MKTEXNAM" $name`; shift -IFS=$OIFS -MT_MFNAME="$3" -#fi - -destdir=`echo "$MT_MFNAME" | sed 's%/[^/][^/]*$%%'` -test -d "$destdir" || "$MT_MKTEXDIR" "$destdir" || exit 1 -cd "$destdir" || exit 1 - -case "$pointsize" in - "") echo "$progname: no pointsize."; exit 1;; - 11) realsize=10.95;; # \magstephalf - 14) realsize=14.4;; # \magstep2 - 17) realsize=17.28;; # \magstep3 - 20) realsize=20.74;; # \magstep4 - 25) realsize=24.88;; # \magstep5 - 30) realsize=29.86;; # \magstep6 - 36) realsize=35.83;; # \magstep7 - # The new convention is to have three or four letters for the - # font name and four digits for the pointsize. The number is - # pointsize * 100. We effectively divide by 100 by ignoring the - # last two digits. - ????|?????) realsize=`echo "$pointsize" | sed 's/\(..\)$/.\1/'`;; - *) realsize="$pointsize";; -esac - -mfname="$name.mf" -if test -r "$mfname"; then - echo "$progname: $destdir/$mfname already exists." - echo "$destdir/$mfname" >$STDOUT - "$MT_MKTEXUPD" "$destdir" "$mfname" - exit 0 -fi - -case "$name" in - ec*|tc*) - cat > "mf$$.tmp" <<END -if unknown exbase: input exbase fi; -gensize:=$realsize; -generate $rootname; -END - ;; - dc*) - cat > "mf$$.tmp" <<END -if unknown dxbase: input dxbase fi; -gensize:=$realsize; -generate $rootname; -END - ;; - cs*|lcsss*|icscsc*|icstt*|ilcsss*) - cat > "mf$$.tmp" <<END -input cscode -use_driver; -END - ;; - wn[bcdfirstuv]*|rx[bcdfiorstuvx][bcfhilmostx]*|l[abcdhl][bcdfiorstuvx]*) - cat > "mf$$.tmp" <<END -input fikparm; -END - ;; - g[lmorst][bijmtwx][cilnoru]*) - # A small superset of the names of the cbgreek fonts. - cat > "mf$$.tmp" <<END -% generated by mktexmf -input cbgreek; -END - ;; - *) - cat > "mf$$.tmp" <<END -design_size := $realsize; -input $rootname; -END - ;; -esac - -chmod `kpsestat -xst,go-w .` "mf$$.tmp" -rm -f "$mfname" -mv "mf$$.tmp" "$mfname" - -echo "$destdir/$mfname" >$STDOUT -echo "$progname: $destdir/$mfname: successfully generated." >&2 -"$MT_MKTEXUPD" "$destdir" "$mfname" -exit 0 -) 1>&2 </dev/null +../../texmf-dist/scripts/texlive/mktexmf
\ No newline at end of file diff --git a/Master/bin/x86_64-linux/mktexpk b/Master/bin/x86_64-linux/mktexpk index 4eaafb1d94e..a0d6db0121b 100755..120000 --- a/Master/bin/x86_64-linux/mktexpk +++ b/Master/bin/x86_64-linux/mktexpk @@ -1,284 +1 @@ -#!/bin/sh -# original mktexpk -- make a new PK font, because one wasn't found. -# -# (If you change or delete the word `original' on the previous line, -# installation won't write this script over yours.) -# -# Originally written by Thomas Esser, Karl Berry, and Olaf Weber. -# Public domain. - -version='$Id$' -progname=`echo $0 | sed 's%.*/%%'` - -# preferentially use subprograms from our own directory. -mydir=`echo "$0" | sed 's,/[^/]*$,,'` -mydir=`cd "$mydir" && pwd` -PATH="$mydir:$PATH"; export PATH - -usage="Usage: $progname [OPTIONS] NAME [REDIRECT], - Create a PK font. - ---dpi DPI use resolution DPI. ---bdpi BDPI use base resolution BDPI. ---mag MAG use magnificiation MAG. ---mfmode MODE use MODE as the METAFONT mode. ---destdir DESTDIR write fonts in DESTDIR. - -Try to create a bitmap PK file for NAME at resolution DPI, with an -assumed device base resolution of BDPI, and a Metafont \`mag' of -MAG. Use MODE for the METAFONT mode. Use DESTDIR for the root of where -to install into, either the absolute directory name to use (if it starts -with a /) or relative to the default DESTDIR (if not). REDIRECT, if -supplied, is a string of the form '>&n', where n is the number of the -file descriptor which is to receive, instead of stdout, the name of the -newly created pk file. - -If you expected the font to be available as an outline, and thus this -script does not work and should not have been called, most likely the -font's .tfm name is missing from the relevant map file (e.g., -psfonts.map for dvips, pdftex.map for pdftex). These map files are -typically maintained using updmap; q.v. - -For step-by-step instructions on making new fonts known to TeX, see -http://tug.org/fonts/fontinstall.html. - -Report bugs to: tex-k@tug.org -TeX Live home page: <http://tug.org/texlive/> -" - -# Handle non-positional options, except for --version/--help -while test $# -gt 0; do - case "$1" in - --destdir) shift; DEST="$1"; shift ;; - --destdir=*) DEST=`echo "$1" | sed 's/--destdir=//'`; shift ;; - --dpi) shift; DPI="$1"; shift ;; - --dpi=*) DPI=`echo "$1" | sed 's/--dpi=//'`; shift ;; - --bdpi) shift; BDPI="$1"; shift ;; - --bdpi=*) BDPI=`echo "$1" | sed 's/--bdpi=//'`; shift ;; - --mfmode) shift; test "x$1" != "x/" && MODE="$1"; shift ;; - --mfmode=*) test "x$1" != "x--mfmode/" \ - && MODE=`echo "$1" | sed 's/--mfmode=//'`; shift ;; - --mag) shift; MAG="$1"; shift;; - --mag=*) MAG=`echo "$1" | sed '/s--mag=//'`; shift;; - --version|-version) break ;; - --help|-help) break ;; - *) break ;; - esac -done - -if test "x$2" != x; then - tail="`echo \"x$2\" | sed 's/^x>&//' | grep '^[0-9]*$'`" - if test -z "$tail"; then - echo "$progname: argument '$2' ignored - bad file number" >&2 - elif test "$tail" != 1; then - eval 'exec 1>&$tail' - fi -fi - -mt_max_args=2 - -# Common code for all scripts. -: ${MT_TEXMFMAIN=`kpsewhich --expand-path='$TEXMFMAIN'`} -: ${MT_MKTEX_OPT=`kpsewhich --format='web2c files' mktex.opt`} -test -n "$MT_MKTEX_OPT" || MT_MKTEX_OPT="$MT_TEXMFMAIN/web2c/mktex.opt" -if test ! -f "$MT_MKTEX_OPT"; then - echo "$progname: Cannot find mktex.opt; check your installation." >&2 - exit 1 -fi - -. "$MT_MKTEX_OPT" - -# Where do potential driver files belong? -case "$MT_FEATURES" in - *nomfdrivers*) - : ${MT_MFDESTDIR=`pwd`} - export MT_MFDESTDIR;; -esac - -# Since we want to pass the generated filename and only that filename -# back to the caller on standard output, we do some redirections so -# regular echo's will end up on stderr, and do an echo >$STDOUT at the end. -# Then the contents of $STDOUT will be echoed to stdout by a trap. - -# start of redirection stdout -> stderr, stdin <- /dev/null -( - -NAME=$1 - -if kpsewhich $NAME.mf >/dev/null 2>&1 || mktexmf $NAME >/dev/null 2>&1; then - # determine the progname of metafont to use; prefer mf-nowin. - if (mf-nowin --version) >/dev/null 2>&1; then - MF="mf-nowin -progname=mf" - else - MF=mf - fi - - # Check that $BDPI and $MODE are consistent; if not, ignore the mode and - # hope we can correctly guess it from bdpi. (People like to specify the - # resolution on the command line, not the mode so much.) - if test -n "$MODE"; then - mf_bdpi=`$MF \ -'\mode:='$MODE';mode_setup;message"BDPI= "&decimal round pixels_per_inch;end.'\ - </dev/null \ - | awk '/DPI=/ {print $2}'` - if test "x$mf_bdpi" != x$BDPI; then - echo "$progname: Mismatched mode $MODE and resolution $BDPI; ignoring mode." >&2 - MODE= - fi - fi - - # If an explicit mode is not supplied, try to guess. You can get a - # list of extant modes from ftp://ftp.tug.org/tex/modes.mf. - if test -z "$MODE" || test "x$MODE" = xdefault; then - case "$BDPI" in - 85) MODE=sun;; - 100) MODE=nextscrn;; - 180) MODE=toshiba;; - 300) MODE=cx;; - 360) MODE=epstylus;; - 400) MODE=nexthi;; - 600) MODE=ljfour;; - 720) MODE=epscszz;; - 1200) MODE=ultre;; - 1270) MODE=linoone;; - 8000) MODE=dpdfezzz;; - *) echo "$progname: Can't guess mode for $BDPI dpi devices." >&2 - echo "$progname: Use a config file or option to specify the mode; see:" >&2 - echo "$progname: http://tug.org/texinfohtml/kpathsea.html#Unable-to-generate-fonts" >&2 - exit 1 - esac - fi - - # Run Metafont. Always use plain Metafont, since reading cmbase.mf - # does not noticeably slow things down. - cmd="$MF \mode:=$MODE; mag:=$MAG; nonstopmode; input $NAME" -else - MODE=modeless - # ps_to_pk is set in mktex.opt - case $ps_to_pk in - gsftopk) - if $ps_to_pk -t "$NAME"; then - cmd="$ps_to_pk $NAME $DPI" - fi;; - ps2pk) - # grep for the font in $PSMAPFILE. These are base font names, such as - # rpplr (the original) or pplr0 (an interim step) or pplr8r (current). - : ${PSMAPFILE=`kpsewhich --format=map psfonts.map ps2pk.map`} - pattern="^$NAME"'([ ]|$)' - psline=`egrep "$pattern" $PSMAPFILE | tail -1` - if test -n "$psline"; then - set x `echo "$psline" | sed 's%[<["]%%g'` - shift; shift; shift; - encoding=; psname=; slant=; extend= - while test ! -z "$1"; do - case "$1" in - *.enc) encoding="-e $1";; - *.pf[ab]) psname="$1";; - *SlantFont) slant="-S $lastopt";; - *ExtendFont) extend="-E $lastopt";; - esac - lastopt="$1" - shift - done - # Guessing the name of the type1 font file as fallback: - ANAME=`echo $NAME | sed 's/8r$/8a/'` - for i in $NAME.pfa $NAME.pfb $ANAME.pfa $ANAME.pfb; do - if kpsewhich $i >/dev/null 2>&1; then - psname=$i - break - fi - done - - if [ -n "$psname" ]; then - cmd="ps2pk -v -X$DPI -R$BDPI $slant $extend $encoding $psname $NAME.${DPI}pk" - else - if gsftopk -t "$NAME"; then - echo "$progname: cannot find $NAME.pfa or $NAME.pfb. Trying gsftopk." >&2 - cmd="gsftopk $NAME $DPI" - fi - fi - fi;; - esac - - # unsupported by $ps_to_pk, try other conversions: - if test -z "$cmd"; then - if (ttf2pk -t -q $NAME) >/dev/null 2>&1; then - cmd="ttf2pk -q $NAME $DPI" - elif (hbf2gf -t -q $NAME) >/dev/null 2>&1; then - cmd="hbf2gf -q -p $NAME $DPI" - else - echo "$progname: don't know how to create bitmap font for $NAME." >&2 - echo "$progname: perhaps $NAME is missing from the map file." >&2 - exit 1 - fi - fi -fi - -OIFS=$IFS; IFS=$SEP -set x `"$MT_MKTEXNAM" $NAME $DPI $MODE $DEST`; shift -IFS=$OIFS - -PKDEST="$1" -PKDESTDIR=`echo "$PKDEST" | sed 's%/[^/][^/]*$%%'` # can't rely on dirname -PKNAME=`basename "$PKDEST"` -GFNAME=$NAME.${DPI}gf - -if test -r "$PKDESTDIR/$PKNAME"; then - echo "$progname: $PKDESTDIR/$PKNAME already exists." >&2 - echo "$PKDESTDIR/$PKNAME" >$STDOUT - "$MT_MKTEXUPD" "$PKDESTDIR" $PKNAME - exit 0 -fi - -"$MT_MKTEXDIR" "$PKDESTDIR" -if test ! -d "$PKDESTDIR"; then - echo "$progname: $MT_MKTEXDIR $PKDESTDIR failed." >&2 - exit 1 -fi - -echo "$progname: Running $cmd" -$cmd </dev/null || { - # Don't abort if only "Strange path", "bad pos" or "angle(0,0)" - # errors occurr. - grep '^!' $NAME.log | sort >$$.errs 2>/dev/null - grep '^! Strange path' $$.errs >$$.strange 2>/dev/null - grep '^! bad pos.' $$.errs >$$.badpos 2>/dev/null - grep '^! angle(0,0) is taken as zero.' $$.errs >$$.angle 2>/dev/null - cat $$.badpos $$.strange $$.angle | sort > $$.errs_accept - if cmp $$.errs $$.errs_accept >/dev/null 2>&1; then - test -s $$.strange >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused strange path errors." >&2 - test -s $$.badpos >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused bad pos errors." >&2 - test -s $$.angle >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused angle(0,0) errors." >&2 - else - echo "$progname: \`$cmd' failed." >&2 - test -s $NAME.log && mv -f $NAME.log "$KPSE_DOT" - exit 1; - fi -} - -test -r $GFNAME && { gftopk ./$GFNAME $PKNAME || exit 1; } -test ! -f $PKNAME && test -f $NAME.${DPI}pk && mv $NAME.${DPI}pk $PKNAME -if test ! -s $PKNAME; then - echo "$progname: \`$cmd' failed to make $PKNAME." >&2 - exit 1 -fi - -# Install the PK file carefully, since others may be working simultaneously. -# Use cp when mv fails, since DOS will fail mv for deeply-nested directories. -mv $PKNAME "$PKDESTDIR/pk$$.tmp" 2>/dev/null \ - || cp $PKNAME "$PKDESTDIR/pk$$.tmp" || exit 1 -cd "$PKDESTDIR" || exit 1 -chmod `kpsestat -xst,go-w .` pk$$.tmp -test -r $PKNAME || mv pk$$.tmp $PKNAME || exit 1 - -# Update ls-R if necessary. -"$MT_MKTEXUPD" "$PKDESTDIR" $PKNAME - -# If this line (or an equivalent) is not present, dvipsk/xdvik/dviljk -# will think mktexpk failed. Any other output to stdout will also lose. -echo "$PKDESTDIR/$PKNAME" >$STDOUT -echo "$progname: $PKDESTDIR/$PKNAME: successfully generated." >&2 -) 1>&2 </dev/null +../../texmf-dist/scripts/texlive/mktexpk
\ No newline at end of file diff --git a/Master/bin/x86_64-linux/mktextfm b/Master/bin/x86_64-linux/mktextfm index d2c132aad89..70ae3a438ce 100755..120000 --- a/Master/bin/x86_64-linux/mktextfm +++ b/Master/bin/x86_64-linux/mktextfm @@ -1,162 +1 @@ -#!/bin/sh -# original mktextfm -- make a new TFM file, because one wasn't found. -# -# (If you change or delete the word `original' on the previous line, -# installation won't write this script over yours.) -# -# Primarily written by Thomas Esser, Karl Berry, and Olaf Weber. -# Public domain. - -version='$Id$' -progname=`echo $0 | sed 's%.*/%%'` - -# preferentially use subprograms from our own directory. -mydir=`echo "$0" | sed 's,/[^/]*$,,'` -mydir=`cd "$mydir" && pwd` -PATH="$mydir:$PATH"; export PATH - -usage="Usage: $progname [--destdir DESTDIR] FONT. - -Makes a TFM file for FONT, if possible. Use DESTDIR for the root of where -to install into, either the absolute directory name to use (if it starts -with a /) or relative to the default DESTDIR (if not). - -Report bugs to: tex-k@tug.org -TeX Live home page: <http://tug.org/texlive/> -" - -# Handle non-positional options, except for --version/--help -while test $# -gt 0; do - case "$1" in - --destdir) shift; DEST="$1"; shift ;; - --destdir=*) DEST=`echo "$1" | sed 's/--destdir=//'`; shift ;; - --version|-version) break ;; - --help|-help) break ;; - *) break ;; - esac -done - -# Common code for all scripts. -: ${MT_TEXMFMAIN=`kpsewhich --expand-path='$TEXMFMAIN'`} -: ${MT_MKTEX_OPT=`kpsewhich --format='web2c files' mktex.opt`} -test -n "$MT_MKTEX_OPT" || MT_MKTEX_OPT="$MT_TEXMFMAIN/web2c/mktex.opt" -if test ! -f "$MT_MKTEX_OPT"; then - echo "$progname: Cannot find mktex.opt; check your installation." >&2 - exit 1 -fi - -. "$MT_MKTEX_OPT" - -# Where do potential mf driver files go? -case "$MT_FEATURES" in - *nomfdrivers*) - : ${MT_MFDESTDIR=`pwd`} - export MT_MFDESTDIR;; -esac - -# start of redirection stdout -> stderr, stdin <- /dev/null -( - -NAME=`basename "$1" .tfm` -MAG=1 # mag=0 fails with larm1000.mf -#DEST="$2" -DPI=$BDPI - -OIFS=$IFS; IFS=$SEP -set x `"$MT_MKTEXNAM" $NAME $DPI $MODE $DEST`; shift -IFS=$OIFS - -PKDEST="$1" -TFMDEST="$2" -PKDESTDIR=`echo "$PKDEST" | sed 's%/[^/][^/]*$%%'` # can't rely on dirname -TFMDESTDIR=`echo "$TFMDEST" | sed 's%/[^/][^/]*$%%'` -PKNAME=`basename "$PKDEST"` -TFMNAME=$NAME.tfm -GFNAME=$NAME.$DPI'gf' - -if test -r "$TFMDESTDIR/$TFMNAME"; then - echo "$progname: $TFMDESTDIR/$TFMNAME already exists." >&2 - echo "$TFMDESTDIR/$TFMNAME" >$STDOUT - "$MT_MKTEXUPD" "$TFMDESTDIR" $TFMNAME - exit -fi - -# Try to create the destdir first. Do not create fonts, if this fails. -"$MT_MKTEXDIR" "$TFMDESTDIR" -if test ! -d "$TFMDESTDIR"; then - echo "$progname: mktexdir $TFMDESTDIR failed." - exit 1 -fi - -# Check if this font is supported by hbf2gf else use metafont. -if (hbf2gf -q -t $NAME) >/dev/null 2>&1; then - cmd="hbf2gf -g $NAME $DPI" -else - # determine the progname of metafont to use; prefer mf-nowin. - if (mf-nowin --version) >/dev/null 2>&1; then - MF="mf-nowin -progname=mf" - else - MF=mf - fi - - cmd="$MF \mode:=$MODE; mag:=$MAG; nonstopmode; input $NAME" -fi - -echo "$progname: Running $cmd" -$cmd </dev/null || { - # Don't abort if only "Strange path", "bad pos" or "angle(0,0)" - # errors occurr. - grep '^!' $NAME.log | sort >$$.errs 2>/dev/null - grep '^! Strange path' $$.errs >$$.strange 2>/dev/null - grep '^! bad pos.' $$.errs >$$.badpos 2>/dev/null - grep '^! angle(0,0) is taken as zero.' $$.errs >$$.angle 2>/dev/null - cat $$.badpos $$.strange $$.angle | sort > $$.errs_accept - if cmp $$.errs $$.errs_accept >/dev/null 2>&1; then - test -s $$.strange >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused strange path errors." >&2 - test -s $$.badpos >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused bad pos errors." >&2 - test -s $$.angle >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused angle(0,0) errors." >&2 - else - echo "$progname: \`$cmd' failed." >&2 - test -s $NAME.log && mv -f $NAME.log "$KPSE_DOT" - exit 1; - fi -} - -# hbf2gf just produces a .pl file: -test -r ./$NAME.pl && pltotf ./$NAME.pl $TFMNAME -test -r $TFMNAME || { echo "$progname: \`$cmd' failed to make $TFMNAME."; exit 1; } - -# Install the TFM file carefully, since others may be working simultaneously. -# Use cp when mv fails, since DOS will fail mv for deeply-nested directories. -mv $TFMNAME "$TFMDESTDIR/tfm$$.tmp" 2>/dev/null \ - || cp $TFMNAME "$TFMDESTDIR/tfm$$.tmp" || exit 1 -cd "$TFMDESTDIR" || exit 1 -chmod `kpsestat -xst,go-w .` tfm$$.tmp -test -r $TFMNAME || mv tfm$$.tmp $TFMNAME || exit 1 - -# OK, success with the TFM. -"$MT_MKTEXUPD" "$TFMDESTDIR" $TFMNAME -echo "$TFMDESTDIR/$TFMNAME" >$STDOUT -echo "$progname: $TFMDESTDIR/$TFMNAME: successfully generated." >&2 - -# Since we probably made a GF(->PK) file, too, may as well install it if -# it's needed. -cd $TEMPDIR -if test -r $GFNAME && test ! -f "$PKDESTDIR/$PKNAME"; then - gftopk ./$GFNAME $PKNAME || exit 1 - "$MT_MKTEXDIR" "$PKDESTDIR" - mv $PKNAME "$PKDESTDIR/pk$$.tmp" 2>/dev/null \ - || cp $PKNAME "$PKDESTDIR/pk$$.tmp" || exit 1 - cd "$PKDESTDIR" || exit 1 - if test -f $PKNAME; then - rm -f pk$$.tmp - else - chmod `kpsestat -xst,go-w .` pk$$.tmp - mv pk$$.tmp $PKNAME - "$MT_MKTEXUPD" "$PKDESTDIR" $PKNAME - fi -fi -) 1>&2 </dev/null +../../texmf-dist/scripts/texlive/mktextfm
\ No newline at end of file diff --git a/Master/bin/x86_64-linuxmusl/mktexlsr b/Master/bin/x86_64-linuxmusl/mktexlsr index bd3eb50d6e4..a36378a2b9f 100755..120000 --- a/Master/bin/x86_64-linuxmusl/mktexlsr +++ b/Master/bin/x86_64-linuxmusl/mktexlsr @@ -1,236 +1 @@ -#!/bin/sh -# original mktexlsr -- create or rebuild ls-R. -# -# (If you change or delete the word `original' on the previous line, -# installation won't write this script over yours.) -# -# Suitable for calling from cron, as in: -# 0 * * * * cd /your/texmf/root && /usr/local/texlive/bin/mktexlsr -# -# Originally written as `texhash' by Thomas Esser, Okt., 1994. -# Public domain. - -version='$Id$' -progname=`echo $0 | sed 's%.*/%%'` - -usage="Usage: $progname [OPTION]... [DIR]... - -Rebuild ls-R filename databases used by TeX. If one or more arguments -DIRS are given, these are used as the directories in which to build -ls-R. Else all directories in the search path for ls-R files -(\$TEXMFDBS) are used. - -Options: - --dry-run do not actually update anything - --help display this help and exit - --quiet cancel --verbose - --silent same as --quiet - --verbose explain what is being done - --version output version information and exit - -If standard input is a terminal, --verbose is on by default. - -For more information, see the \`Filename database' section of -Kpathsea manual available at http://tug.org/kpathsea. - -Report bugs to: tex-k@tug.org -TeX Live home page: <http://tug.org/texlive/> -" - -# The simple PATH-prepending approach we take in other scripts doesn't -# handle DOS/Windows, but we don't use the shell scripts on Windows -# anyway, and does anyone want current TL on DOS or DJGPP? Maybe they -# can maintain their own changes if so. Leaving this code though, since -# it's always been here ... - -# MS-DOS and MS-Windows define $COMSPEC or $ComSpec and use `;' to separate -# directories in path lists whereas Unix uses `:'. Make an exception for -# Cygwin, which pretends to be UNIX. -# Create a variable that holds the right character to be used by the scripts. -DOSISH=no -case `uname -s` in - CYGWIN*|Cygwin*|cygwin*) ;; - *) if test -n "$COMSPEC" || test -n "$ComSpec"; then DOSISH=yes; fi -esac -if test "$DOSISH" = "no"; then SEP=':'; else SEP=';';fi - -# Add the location of the script to the PATH if necessary. This must -# be done before kpsewhich can be called, and thus cannot be put into -# mktex.opt. -dirname=`echo $0 | sed 's%/*[^/][^/]*$%%'` -case $dirname in - "") # Do nothing - ;; - /* | [A-z]:/*) # Absolute name - PATH="$dirname$SEP$PATH" - export PATH ;; - *) # Relative name - PATH="`pwd`/$dirname$SEP$PATH" - export PATH ;; -esac - -if tty -s; then verbose=true; else verbose=false; fi -dry_run=false -trees= - -# initialize treefile by either mktemp or some random name -# code taken from pdfjam and adjusted -{ - treefile=` - (umask 077 && mktemp "${TMPDIR-/tmp}/mktexlsrtrees.XXXXXXXXXX") 2>/dev/null - ` && test -n "$treefile" && test -f "$treefile" -} || { - ## We'll use awk to make random number, for portability - random=`awk 'END { srand(); printf ("%d\n", rand()*1000000); }' /dev/null` - treefile="${TMPDIR-/tmp}/mktexlsrtrees$$.$random" -} || exit $? - -trap 'cd /; rm -f $treefile; test -z "$db_dir_tmp" || rm -rf "$db_dir_tmp"; - exit' 0 1 2 3 7 13 15 - -# A copy of some stuff from mktex.opt, so we can run in the presence of -# terminally damaged ls-R files. -while test $# -gt 0; do - if test "x$1" = x--help || test "x$1" = x-help; then - echo "$usage" - exit 0 - elif test "x$1" = x--version || test "x$1" = x-version; then - echo "`basename $0` $version" - kpsewhich --version - exit 0 - elif test "x$1" = x--verbose || test "x$1" = x-verbose; then - verbose=true - elif test "x$1" = x--dry-run || test "x$1" = x-n; then - dry_run=true - elif test "x$1" = x--quiet || test "x$1" = x--silent \ - || test "x$1" = x-quiet || test "x$1" = x-silent ; then - verbose=false - elif test "x$1" = x--; then - : - elif echo "x$1" | grep '^x-' >/dev/null; then - echo "$progname: unknown option \`$1', try --help if you need it." >&2 - exit 1 - else - if test ! -d "$1"; then - echo "$progname: $1: not a directory, skipping." >&2 - shift - continue - fi - # By saving the argument in a file, we can later get it back while - # supporting spaces in the name. This still doesn't support - # newlines in the directory names, but nobody ever complains about - # that, and it seems much too much trouble to use \0 terminators. - (umask 077 - if echo "$1" >>"$treefile"; then :; else - echo "$progname: $treefile: could not append to arg file, goodbye." >&2 - exit 1 - fi - ) - fi - shift -done - -# mktexupd and mktexlsr make sure they're coordinated via this. A copy -# is found mktex.opt. -ls_R_magic='% ls-R -- filename database for kpathsea; do not change this line.' -# The old string, which should continue to work. -old_ls_R_magic='% ls-R -- maintained by MakeTeXls-R; do not change this line.' - -{ - # Get list of directories from the explicit arguments (now saved in - # $treefile), or $TEXMFDBS if no explicit args. Eliminate duplicates. - saveIFS=$IFS # break only at newline - IFS=' -' - if test -s "$treefile"; then - set x `sort "$treefile" | uniq` - else - set x `kpsewhich --show-path=ls-R | tr : ' -' | sort | uniq` - fi - IFS=$saveIFS - shift -} - -for TEXMFLS_R in "$@"; do - # Prepend cwd if the directory was relative. - case "$TEXMFLS_R" in - "") continue ;; # Strictly speaking, it is an error if this case is taken. - /* | [A-z]:/*) ;; - *) TEXMFLS_R="`pwd`/$TEXMFLS_R" - esac - # Allow for either ls-R and ls-r to exist. But create ls-R if we're - # working from scratch. - if test -f "$TEXMFLS_R/ls-R"; then - db_file="$TEXMFLS_R/ls-R" - elif test -f "$TEXMFLS_R/ls-r"; then - db_file="$TEXMFLS_R/ls-r" - else - db_file="$TEXMFLS_R/ls-R" - fi - # Follow a possible symlink to get the right filesystem. - # The '|| true' construct prevents an sh -e aborting. - db_readlink=`kpsereadlink "$TEXMFLS_R/ls-R" 2>/dev/null` || true - case "$db_readlink" in - "") ;; - /* | [A-z]:/*) db_file="$db_readlink" ;; - *) db_file="$TEXMFLS_R/$db_readlink" - esac - db_dir=`echo "$db_file" | sed 's%/[^/][^/]*$%%'` # can't rely on dirname - - # want to be silent if the directory doesn't exist, since the ls-R - # path ordinarily contains many nonexistent directories. - test -d "$db_dir" || continue - test -w "$db_dir" || { echo "$progname: $db_dir: directory not writable. Skipping..." >&2; continue; } - - if test ! -f "$db_file"; then - cp /dev/null "$db_file" - # Use same permissions as parent directory, minus x,s, or t bits. - chmod `kpsestat -xst "$db_dir"` "$db_file" - elif test -s "$db_file" \ - && test "x`sed '1s/
$//;1q' \"$db_file\"`" != "x$ls_R_magic" \ - && test "x`sed '1s/
$//;1q' \"$db_file\"`" != "x$old_ls_R_magic"; then - echo "$progname: $db_file: no magic string, skipping..." >&2 - continue - fi - - # Skip if we cannot write the file: - kpseaccess -w "$db_file" || { echo "$progname: $db_file: no write permission, skipping..." >&2; continue; } - - db_dir_tmp="$db_dir/lsR$$.tmp" - (umask 077 && mkdir "$db_dir_tmp" ) \ - || { echo "$progname: $db_dir_tmp: could not create directory, skipping..." >&2; continue; } - db_file_tmp="$db_dir_tmp/lsR$$.tmp" - rm -f "$db_file_tmp" - - $verbose && echo "$progname: Updating $db_file... " - $dry_run && continue - - echo "$ls_R_magic" >"$db_file_tmp" - - # The main task. We put ./: in the output, so top-level files can be - # found via ls-R. Probably irrelevant in practice. The sed command - # inserts the leading ./ for directory names, and removes ., .., and - # version control entries from the list. Also omit contents of any - # the version directories; sed apparently requires that we do that - # operation in a separate invocation. We do not try to support colons - # in directory names. - # - echo "./:" >>"$db_file_tmp" - vc_dirs='\.\(bzr\|git\|hg\|svn\)\|_darcs' - (cd "$TEXMFLS_R" && \ls -LRa 2>/dev/null) \ - | sed -e '/^$/{n;s%^\./%%;s%^%./%;}; /^\.$/d; /^\.\.$/d; /^'$vc_dirs'$/d;' \ - -e '/^[\.\/]*lsR[0-9]*\.tmp:*$/d' \ - | sed -e /$vc_dirs'.*:$/,/^$/d' \ - >>"$db_file_tmp" - - # To be really safe, a loop. - until PERMS=`kpsestat = "$db_file"`; do sleep 1; done - chmod $PERMS "$db_file_tmp" - rm -f "$db_file" - mv "$db_file_tmp" "$db_file" - rm -rf "$db_dir_tmp" -done - -$verbose && echo "$progname: Done." -exit 0 +../../texmf-dist/scripts/texlive/mktexlsr
\ No newline at end of file diff --git a/Master/bin/x86_64-linuxmusl/mktexmf b/Master/bin/x86_64-linuxmusl/mktexmf index f6b8991e8d1..302c00f763e 100755..120000 --- a/Master/bin/x86_64-linuxmusl/mktexmf +++ b/Master/bin/x86_64-linuxmusl/mktexmf @@ -1,151 +1 @@ -#!/bin/sh -# original mktexmf -- make a new MF file, because one wasn't found. -# -# (If you change or delete the word `original' on the previous line, -# installation won't write this script over yours.) -# -# Originally written by Thomas Esser. -# Public domain. - -version='$Id$' - -# preferentially use subprograms from our own directory. -mydir=`echo "$0" | sed 's,/[^/]*$,,'` -mydir=`cd "$mydir" && pwd` -PATH="$mydir:$PATH"; export PATH - -usage="Usage: $0 FONT. - -Makes the Metafont source file for FONT, if possible. For example, -\`ecr12' or \`cmr11'. - -Report bugs to: tex-k@tug.org -TeX Live home page: <http://tug.org/texlive/> -" - -# Common code for all scripts. -: ${MT_TEXMFMAIN=`kpsewhich --expand-path='$TEXMFMAIN'`} -: ${MT_MKTEX_OPT=`kpsewhich --format='web2c files' mktex.opt`} -test -n "$MT_MKTEX_OPT" || MT_MKTEX_OPT="$MT_TEXMFMAIN/web2c/mktex.opt" -if test ! -f "$MT_MKTEX_OPT"; then - echo "$progname: Cannot find mktex.opt; check your installation." >&2 - exit 1 -fi - -. "$MT_MKTEX_OPT" - -( -# See comments in mktexpk. -name="`echo $1 | sed 's%.*/%%; s%\.mf$%%'`" -rootname=`echo "$name" | sed 's/[0-9]*$//'` -pointsize=`echo "$name" | sed "s/^$rootname//"` - -sauterroot=`kpsewhich b-$rootname.mf 2>/dev/null` -if test -n "$sauterroot"; then - rootfile=$sauterroot - rootname=b-$rootname -else - case $name in - # csso12[0-5][0-9] from CJK package; unsupported by mktexmf - csso12[0-5][0-9]) - rootfile=;; - *) - case $rootname in - cs*|lcsss*|icscsc*|icstt*|ilcsss*) - rootfile=`kpsewhich cscode.mf`;; - wn[bcdfirstuv]*|rx[bcdfiorstuvx][bcfhilmostx]|l[abcdhl][bcdfiorstuvx]*) - lhprefix=`echo "$name" | sed 's/^\(..\).*/\1/'` - rootfile=`kpsewhich ${lhprefix}codes.mf 2>/dev/null`;; - *) - rootfile=`kpsewhich $rootname.mf 2>/dev/null`;; - esac;; - esac -fi -{ test -z "$rootfile" || test ! -f "$rootfile"; } && exit 1 - -#if test -z "$MT_MFNAME"; then -OIFS=$IFS; IFS=$SEP -set x `"$MT_MKTEXNAM" $name`; shift -IFS=$OIFS -MT_MFNAME="$3" -#fi - -destdir=`echo "$MT_MFNAME" | sed 's%/[^/][^/]*$%%'` -test -d "$destdir" || "$MT_MKTEXDIR" "$destdir" || exit 1 -cd "$destdir" || exit 1 - -case "$pointsize" in - "") echo "$progname: no pointsize."; exit 1;; - 11) realsize=10.95;; # \magstephalf - 14) realsize=14.4;; # \magstep2 - 17) realsize=17.28;; # \magstep3 - 20) realsize=20.74;; # \magstep4 - 25) realsize=24.88;; # \magstep5 - 30) realsize=29.86;; # \magstep6 - 36) realsize=35.83;; # \magstep7 - # The new convention is to have three or four letters for the - # font name and four digits for the pointsize. The number is - # pointsize * 100. We effectively divide by 100 by ignoring the - # last two digits. - ????|?????) realsize=`echo "$pointsize" | sed 's/\(..\)$/.\1/'`;; - *) realsize="$pointsize";; -esac - -mfname="$name.mf" -if test -r "$mfname"; then - echo "$progname: $destdir/$mfname already exists." - echo "$destdir/$mfname" >$STDOUT - "$MT_MKTEXUPD" "$destdir" "$mfname" - exit 0 -fi - -case "$name" in - ec*|tc*) - cat > "mf$$.tmp" <<END -if unknown exbase: input exbase fi; -gensize:=$realsize; -generate $rootname; -END - ;; - dc*) - cat > "mf$$.tmp" <<END -if unknown dxbase: input dxbase fi; -gensize:=$realsize; -generate $rootname; -END - ;; - cs*|lcsss*|icscsc*|icstt*|ilcsss*) - cat > "mf$$.tmp" <<END -input cscode -use_driver; -END - ;; - wn[bcdfirstuv]*|rx[bcdfiorstuvx][bcfhilmostx]*|l[abcdhl][bcdfiorstuvx]*) - cat > "mf$$.tmp" <<END -input fikparm; -END - ;; - g[lmorst][bijmtwx][cilnoru]*) - # A small superset of the names of the cbgreek fonts. - cat > "mf$$.tmp" <<END -% generated by mktexmf -input cbgreek; -END - ;; - *) - cat > "mf$$.tmp" <<END -design_size := $realsize; -input $rootname; -END - ;; -esac - -chmod `kpsestat -xst,go-w .` "mf$$.tmp" -rm -f "$mfname" -mv "mf$$.tmp" "$mfname" - -echo "$destdir/$mfname" >$STDOUT -echo "$progname: $destdir/$mfname: successfully generated." >&2 -"$MT_MKTEXUPD" "$destdir" "$mfname" -exit 0 -) 1>&2 </dev/null +../../texmf-dist/scripts/texlive/mktexmf
\ No newline at end of file diff --git a/Master/bin/x86_64-linuxmusl/mktexpk b/Master/bin/x86_64-linuxmusl/mktexpk index 4eaafb1d94e..a0d6db0121b 100755..120000 --- a/Master/bin/x86_64-linuxmusl/mktexpk +++ b/Master/bin/x86_64-linuxmusl/mktexpk @@ -1,284 +1 @@ -#!/bin/sh -# original mktexpk -- make a new PK font, because one wasn't found. -# -# (If you change or delete the word `original' on the previous line, -# installation won't write this script over yours.) -# -# Originally written by Thomas Esser, Karl Berry, and Olaf Weber. -# Public domain. - -version='$Id$' -progname=`echo $0 | sed 's%.*/%%'` - -# preferentially use subprograms from our own directory. -mydir=`echo "$0" | sed 's,/[^/]*$,,'` -mydir=`cd "$mydir" && pwd` -PATH="$mydir:$PATH"; export PATH - -usage="Usage: $progname [OPTIONS] NAME [REDIRECT], - Create a PK font. - ---dpi DPI use resolution DPI. ---bdpi BDPI use base resolution BDPI. ---mag MAG use magnificiation MAG. ---mfmode MODE use MODE as the METAFONT mode. ---destdir DESTDIR write fonts in DESTDIR. - -Try to create a bitmap PK file for NAME at resolution DPI, with an -assumed device base resolution of BDPI, and a Metafont \`mag' of -MAG. Use MODE for the METAFONT mode. Use DESTDIR for the root of where -to install into, either the absolute directory name to use (if it starts -with a /) or relative to the default DESTDIR (if not). REDIRECT, if -supplied, is a string of the form '>&n', where n is the number of the -file descriptor which is to receive, instead of stdout, the name of the -newly created pk file. - -If you expected the font to be available as an outline, and thus this -script does not work and should not have been called, most likely the -font's .tfm name is missing from the relevant map file (e.g., -psfonts.map for dvips, pdftex.map for pdftex). These map files are -typically maintained using updmap; q.v. - -For step-by-step instructions on making new fonts known to TeX, see -http://tug.org/fonts/fontinstall.html. - -Report bugs to: tex-k@tug.org -TeX Live home page: <http://tug.org/texlive/> -" - -# Handle non-positional options, except for --version/--help -while test $# -gt 0; do - case "$1" in - --destdir) shift; DEST="$1"; shift ;; - --destdir=*) DEST=`echo "$1" | sed 's/--destdir=//'`; shift ;; - --dpi) shift; DPI="$1"; shift ;; - --dpi=*) DPI=`echo "$1" | sed 's/--dpi=//'`; shift ;; - --bdpi) shift; BDPI="$1"; shift ;; - --bdpi=*) BDPI=`echo "$1" | sed 's/--bdpi=//'`; shift ;; - --mfmode) shift; test "x$1" != "x/" && MODE="$1"; shift ;; - --mfmode=*) test "x$1" != "x--mfmode/" \ - && MODE=`echo "$1" | sed 's/--mfmode=//'`; shift ;; - --mag) shift; MAG="$1"; shift;; - --mag=*) MAG=`echo "$1" | sed '/s--mag=//'`; shift;; - --version|-version) break ;; - --help|-help) break ;; - *) break ;; - esac -done - -if test "x$2" != x; then - tail="`echo \"x$2\" | sed 's/^x>&//' | grep '^[0-9]*$'`" - if test -z "$tail"; then - echo "$progname: argument '$2' ignored - bad file number" >&2 - elif test "$tail" != 1; then - eval 'exec 1>&$tail' - fi -fi - -mt_max_args=2 - -# Common code for all scripts. -: ${MT_TEXMFMAIN=`kpsewhich --expand-path='$TEXMFMAIN'`} -: ${MT_MKTEX_OPT=`kpsewhich --format='web2c files' mktex.opt`} -test -n "$MT_MKTEX_OPT" || MT_MKTEX_OPT="$MT_TEXMFMAIN/web2c/mktex.opt" -if test ! -f "$MT_MKTEX_OPT"; then - echo "$progname: Cannot find mktex.opt; check your installation." >&2 - exit 1 -fi - -. "$MT_MKTEX_OPT" - -# Where do potential driver files belong? -case "$MT_FEATURES" in - *nomfdrivers*) - : ${MT_MFDESTDIR=`pwd`} - export MT_MFDESTDIR;; -esac - -# Since we want to pass the generated filename and only that filename -# back to the caller on standard output, we do some redirections so -# regular echo's will end up on stderr, and do an echo >$STDOUT at the end. -# Then the contents of $STDOUT will be echoed to stdout by a trap. - -# start of redirection stdout -> stderr, stdin <- /dev/null -( - -NAME=$1 - -if kpsewhich $NAME.mf >/dev/null 2>&1 || mktexmf $NAME >/dev/null 2>&1; then - # determine the progname of metafont to use; prefer mf-nowin. - if (mf-nowin --version) >/dev/null 2>&1; then - MF="mf-nowin -progname=mf" - else - MF=mf - fi - - # Check that $BDPI and $MODE are consistent; if not, ignore the mode and - # hope we can correctly guess it from bdpi. (People like to specify the - # resolution on the command line, not the mode so much.) - if test -n "$MODE"; then - mf_bdpi=`$MF \ -'\mode:='$MODE';mode_setup;message"BDPI= "&decimal round pixels_per_inch;end.'\ - </dev/null \ - | awk '/DPI=/ {print $2}'` - if test "x$mf_bdpi" != x$BDPI; then - echo "$progname: Mismatched mode $MODE and resolution $BDPI; ignoring mode." >&2 - MODE= - fi - fi - - # If an explicit mode is not supplied, try to guess. You can get a - # list of extant modes from ftp://ftp.tug.org/tex/modes.mf. - if test -z "$MODE" || test "x$MODE" = xdefault; then - case "$BDPI" in - 85) MODE=sun;; - 100) MODE=nextscrn;; - 180) MODE=toshiba;; - 300) MODE=cx;; - 360) MODE=epstylus;; - 400) MODE=nexthi;; - 600) MODE=ljfour;; - 720) MODE=epscszz;; - 1200) MODE=ultre;; - 1270) MODE=linoone;; - 8000) MODE=dpdfezzz;; - *) echo "$progname: Can't guess mode for $BDPI dpi devices." >&2 - echo "$progname: Use a config file or option to specify the mode; see:" >&2 - echo "$progname: http://tug.org/texinfohtml/kpathsea.html#Unable-to-generate-fonts" >&2 - exit 1 - esac - fi - - # Run Metafont. Always use plain Metafont, since reading cmbase.mf - # does not noticeably slow things down. - cmd="$MF \mode:=$MODE; mag:=$MAG; nonstopmode; input $NAME" -else - MODE=modeless - # ps_to_pk is set in mktex.opt - case $ps_to_pk in - gsftopk) - if $ps_to_pk -t "$NAME"; then - cmd="$ps_to_pk $NAME $DPI" - fi;; - ps2pk) - # grep for the font in $PSMAPFILE. These are base font names, such as - # rpplr (the original) or pplr0 (an interim step) or pplr8r (current). - : ${PSMAPFILE=`kpsewhich --format=map psfonts.map ps2pk.map`} - pattern="^$NAME"'([ ]|$)' - psline=`egrep "$pattern" $PSMAPFILE | tail -1` - if test -n "$psline"; then - set x `echo "$psline" | sed 's%[<["]%%g'` - shift; shift; shift; - encoding=; psname=; slant=; extend= - while test ! -z "$1"; do - case "$1" in - *.enc) encoding="-e $1";; - *.pf[ab]) psname="$1";; - *SlantFont) slant="-S $lastopt";; - *ExtendFont) extend="-E $lastopt";; - esac - lastopt="$1" - shift - done - # Guessing the name of the type1 font file as fallback: - ANAME=`echo $NAME | sed 's/8r$/8a/'` - for i in $NAME.pfa $NAME.pfb $ANAME.pfa $ANAME.pfb; do - if kpsewhich $i >/dev/null 2>&1; then - psname=$i - break - fi - done - - if [ -n "$psname" ]; then - cmd="ps2pk -v -X$DPI -R$BDPI $slant $extend $encoding $psname $NAME.${DPI}pk" - else - if gsftopk -t "$NAME"; then - echo "$progname: cannot find $NAME.pfa or $NAME.pfb. Trying gsftopk." >&2 - cmd="gsftopk $NAME $DPI" - fi - fi - fi;; - esac - - # unsupported by $ps_to_pk, try other conversions: - if test -z "$cmd"; then - if (ttf2pk -t -q $NAME) >/dev/null 2>&1; then - cmd="ttf2pk -q $NAME $DPI" - elif (hbf2gf -t -q $NAME) >/dev/null 2>&1; then - cmd="hbf2gf -q -p $NAME $DPI" - else - echo "$progname: don't know how to create bitmap font for $NAME." >&2 - echo "$progname: perhaps $NAME is missing from the map file." >&2 - exit 1 - fi - fi -fi - -OIFS=$IFS; IFS=$SEP -set x `"$MT_MKTEXNAM" $NAME $DPI $MODE $DEST`; shift -IFS=$OIFS - -PKDEST="$1" -PKDESTDIR=`echo "$PKDEST" | sed 's%/[^/][^/]*$%%'` # can't rely on dirname -PKNAME=`basename "$PKDEST"` -GFNAME=$NAME.${DPI}gf - -if test -r "$PKDESTDIR/$PKNAME"; then - echo "$progname: $PKDESTDIR/$PKNAME already exists." >&2 - echo "$PKDESTDIR/$PKNAME" >$STDOUT - "$MT_MKTEXUPD" "$PKDESTDIR" $PKNAME - exit 0 -fi - -"$MT_MKTEXDIR" "$PKDESTDIR" -if test ! -d "$PKDESTDIR"; then - echo "$progname: $MT_MKTEXDIR $PKDESTDIR failed." >&2 - exit 1 -fi - -echo "$progname: Running $cmd" -$cmd </dev/null || { - # Don't abort if only "Strange path", "bad pos" or "angle(0,0)" - # errors occurr. - grep '^!' $NAME.log | sort >$$.errs 2>/dev/null - grep '^! Strange path' $$.errs >$$.strange 2>/dev/null - grep '^! bad pos.' $$.errs >$$.badpos 2>/dev/null - grep '^! angle(0,0) is taken as zero.' $$.errs >$$.angle 2>/dev/null - cat $$.badpos $$.strange $$.angle | sort > $$.errs_accept - if cmp $$.errs $$.errs_accept >/dev/null 2>&1; then - test -s $$.strange >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused strange path errors." >&2 - test -s $$.badpos >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused bad pos errors." >&2 - test -s $$.angle >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused angle(0,0) errors." >&2 - else - echo "$progname: \`$cmd' failed." >&2 - test -s $NAME.log && mv -f $NAME.log "$KPSE_DOT" - exit 1; - fi -} - -test -r $GFNAME && { gftopk ./$GFNAME $PKNAME || exit 1; } -test ! -f $PKNAME && test -f $NAME.${DPI}pk && mv $NAME.${DPI}pk $PKNAME -if test ! -s $PKNAME; then - echo "$progname: \`$cmd' failed to make $PKNAME." >&2 - exit 1 -fi - -# Install the PK file carefully, since others may be working simultaneously. -# Use cp when mv fails, since DOS will fail mv for deeply-nested directories. -mv $PKNAME "$PKDESTDIR/pk$$.tmp" 2>/dev/null \ - || cp $PKNAME "$PKDESTDIR/pk$$.tmp" || exit 1 -cd "$PKDESTDIR" || exit 1 -chmod `kpsestat -xst,go-w .` pk$$.tmp -test -r $PKNAME || mv pk$$.tmp $PKNAME || exit 1 - -# Update ls-R if necessary. -"$MT_MKTEXUPD" "$PKDESTDIR" $PKNAME - -# If this line (or an equivalent) is not present, dvipsk/xdvik/dviljk -# will think mktexpk failed. Any other output to stdout will also lose. -echo "$PKDESTDIR/$PKNAME" >$STDOUT -echo "$progname: $PKDESTDIR/$PKNAME: successfully generated." >&2 -) 1>&2 </dev/null +../../texmf-dist/scripts/texlive/mktexpk
\ No newline at end of file diff --git a/Master/bin/x86_64-linuxmusl/mktextfm b/Master/bin/x86_64-linuxmusl/mktextfm index d2c132aad89..70ae3a438ce 100755..120000 --- a/Master/bin/x86_64-linuxmusl/mktextfm +++ b/Master/bin/x86_64-linuxmusl/mktextfm @@ -1,162 +1 @@ -#!/bin/sh -# original mktextfm -- make a new TFM file, because one wasn't found. -# -# (If you change or delete the word `original' on the previous line, -# installation won't write this script over yours.) -# -# Primarily written by Thomas Esser, Karl Berry, and Olaf Weber. -# Public domain. - -version='$Id$' -progname=`echo $0 | sed 's%.*/%%'` - -# preferentially use subprograms from our own directory. -mydir=`echo "$0" | sed 's,/[^/]*$,,'` -mydir=`cd "$mydir" && pwd` -PATH="$mydir:$PATH"; export PATH - -usage="Usage: $progname [--destdir DESTDIR] FONT. - -Makes a TFM file for FONT, if possible. Use DESTDIR for the root of where -to install into, either the absolute directory name to use (if it starts -with a /) or relative to the default DESTDIR (if not). - -Report bugs to: tex-k@tug.org -TeX Live home page: <http://tug.org/texlive/> -" - -# Handle non-positional options, except for --version/--help -while test $# -gt 0; do - case "$1" in - --destdir) shift; DEST="$1"; shift ;; - --destdir=*) DEST=`echo "$1" | sed 's/--destdir=//'`; shift ;; - --version|-version) break ;; - --help|-help) break ;; - *) break ;; - esac -done - -# Common code for all scripts. -: ${MT_TEXMFMAIN=`kpsewhich --expand-path='$TEXMFMAIN'`} -: ${MT_MKTEX_OPT=`kpsewhich --format='web2c files' mktex.opt`} -test -n "$MT_MKTEX_OPT" || MT_MKTEX_OPT="$MT_TEXMFMAIN/web2c/mktex.opt" -if test ! -f "$MT_MKTEX_OPT"; then - echo "$progname: Cannot find mktex.opt; check your installation." >&2 - exit 1 -fi - -. "$MT_MKTEX_OPT" - -# Where do potential mf driver files go? -case "$MT_FEATURES" in - *nomfdrivers*) - : ${MT_MFDESTDIR=`pwd`} - export MT_MFDESTDIR;; -esac - -# start of redirection stdout -> stderr, stdin <- /dev/null -( - -NAME=`basename "$1" .tfm` -MAG=1 # mag=0 fails with larm1000.mf -#DEST="$2" -DPI=$BDPI - -OIFS=$IFS; IFS=$SEP -set x `"$MT_MKTEXNAM" $NAME $DPI $MODE $DEST`; shift -IFS=$OIFS - -PKDEST="$1" -TFMDEST="$2" -PKDESTDIR=`echo "$PKDEST" | sed 's%/[^/][^/]*$%%'` # can't rely on dirname -TFMDESTDIR=`echo "$TFMDEST" | sed 's%/[^/][^/]*$%%'` -PKNAME=`basename "$PKDEST"` -TFMNAME=$NAME.tfm -GFNAME=$NAME.$DPI'gf' - -if test -r "$TFMDESTDIR/$TFMNAME"; then - echo "$progname: $TFMDESTDIR/$TFMNAME already exists." >&2 - echo "$TFMDESTDIR/$TFMNAME" >$STDOUT - "$MT_MKTEXUPD" "$TFMDESTDIR" $TFMNAME - exit -fi - -# Try to create the destdir first. Do not create fonts, if this fails. -"$MT_MKTEXDIR" "$TFMDESTDIR" -if test ! -d "$TFMDESTDIR"; then - echo "$progname: mktexdir $TFMDESTDIR failed." - exit 1 -fi - -# Check if this font is supported by hbf2gf else use metafont. -if (hbf2gf -q -t $NAME) >/dev/null 2>&1; then - cmd="hbf2gf -g $NAME $DPI" -else - # determine the progname of metafont to use; prefer mf-nowin. - if (mf-nowin --version) >/dev/null 2>&1; then - MF="mf-nowin -progname=mf" - else - MF=mf - fi - - cmd="$MF \mode:=$MODE; mag:=$MAG; nonstopmode; input $NAME" -fi - -echo "$progname: Running $cmd" -$cmd </dev/null || { - # Don't abort if only "Strange path", "bad pos" or "angle(0,0)" - # errors occurr. - grep '^!' $NAME.log | sort >$$.errs 2>/dev/null - grep '^! Strange path' $$.errs >$$.strange 2>/dev/null - grep '^! bad pos.' $$.errs >$$.badpos 2>/dev/null - grep '^! angle(0,0) is taken as zero.' $$.errs >$$.angle 2>/dev/null - cat $$.badpos $$.strange $$.angle | sort > $$.errs_accept - if cmp $$.errs $$.errs_accept >/dev/null 2>&1; then - test -s $$.strange >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused strange path errors." >&2 - test -s $$.badpos >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused bad pos errors." >&2 - test -s $$.angle >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused angle(0,0) errors." >&2 - else - echo "$progname: \`$cmd' failed." >&2 - test -s $NAME.log && mv -f $NAME.log "$KPSE_DOT" - exit 1; - fi -} - -# hbf2gf just produces a .pl file: -test -r ./$NAME.pl && pltotf ./$NAME.pl $TFMNAME -test -r $TFMNAME || { echo "$progname: \`$cmd' failed to make $TFMNAME."; exit 1; } - -# Install the TFM file carefully, since others may be working simultaneously. -# Use cp when mv fails, since DOS will fail mv for deeply-nested directories. -mv $TFMNAME "$TFMDESTDIR/tfm$$.tmp" 2>/dev/null \ - || cp $TFMNAME "$TFMDESTDIR/tfm$$.tmp" || exit 1 -cd "$TFMDESTDIR" || exit 1 -chmod `kpsestat -xst,go-w .` tfm$$.tmp -test -r $TFMNAME || mv tfm$$.tmp $TFMNAME || exit 1 - -# OK, success with the TFM. -"$MT_MKTEXUPD" "$TFMDESTDIR" $TFMNAME -echo "$TFMDESTDIR/$TFMNAME" >$STDOUT -echo "$progname: $TFMDESTDIR/$TFMNAME: successfully generated." >&2 - -# Since we probably made a GF(->PK) file, too, may as well install it if -# it's needed. -cd $TEMPDIR -if test -r $GFNAME && test ! -f "$PKDESTDIR/$PKNAME"; then - gftopk ./$GFNAME $PKNAME || exit 1 - "$MT_MKTEXDIR" "$PKDESTDIR" - mv $PKNAME "$PKDESTDIR/pk$$.tmp" 2>/dev/null \ - || cp $PKNAME "$PKDESTDIR/pk$$.tmp" || exit 1 - cd "$PKDESTDIR" || exit 1 - if test -f $PKNAME; then - rm -f pk$$.tmp - else - chmod `kpsestat -xst,go-w .` pk$$.tmp - mv pk$$.tmp $PKNAME - "$MT_MKTEXUPD" "$PKDESTDIR" $PKNAME - fi -fi -) 1>&2 </dev/null +../../texmf-dist/scripts/texlive/mktextfm
\ No newline at end of file diff --git a/Master/bin/x86_64-solaris/mktexlsr b/Master/bin/x86_64-solaris/mktexlsr index 5fde39e2c2d..a36378a2b9f 100755..120000 --- a/Master/bin/x86_64-solaris/mktexlsr +++ b/Master/bin/x86_64-solaris/mktexlsr @@ -1,236 +1 @@ -#!/bin/sh -# original mktexlsr -- create or rebuild ls-R. -# -# (If you change or delete the word `original' on the previous line, -# installation won't write this script over yours.) -# -# Suitable for calling from cron, as in: -# 0 * * * * cd /your/texmf/root && /usr/local/texlive/bin/mktexlsr -# -# Originally written as `texhash' by Thomas Esser, Okt., 1994. -# Public domain. - -version='$Id: mktexlsr 46343 2018-01-17 00:55:32Z preining $' -progname=`echo $0 | sed 's%.*/%%'` - -usage="Usage: $progname [OPTION]... [DIR]... - -Rebuild ls-R filename databases used by TeX. If one or more arguments -DIRS are given, these are used as the directories in which to build -ls-R. Else all directories in the search path for ls-R files -(\$TEXMFDBS) are used. - -Options: - --dry-run do not actually update anything - --help display this help and exit - --quiet cancel --verbose - --silent same as --quiet - --verbose explain what is being done - --version output version information and exit - -If standard input is a terminal, --verbose is on by default. - -For more information, see the \`Filename database' section of -Kpathsea manual available at http://tug.org/kpathsea. - -Report bugs to: tex-k@tug.org -TeX Live home page: <http://tug.org/texlive/> -" - -# The simple PATH-prepending approach we take in other scripts doesn't -# handle DOS/Windows, but we don't use the shell scripts on Windows -# anyway, and does anyone want current TL on DOS or DJGPP? Maybe they -# can maintain their own changes if so. Leaving this code though, since -# it's always been here ... - -# MS-DOS and MS-Windows define $COMSPEC or $ComSpec and use `;' to separate -# directories in path lists whereas Unix uses `:'. Make an exception for -# Cygwin, which pretends to be UNIX. -# Create a variable that holds the right character to be used by the scripts. -DOSISH=no -case `uname -s` in - CYGWIN*|Cygwin*|cygwin*) ;; - *) if test -n "$COMSPEC" || test -n "$ComSpec"; then DOSISH=yes; fi -esac -if test "$DOSISH" = "no"; then SEP=':'; else SEP=';';fi - -# Add the location of the script to the PATH if necessary. This must -# be done before kpsewhich can be called, and thus cannot be put into -# mktex.opt. -dirname=`echo $0 | sed 's%/*[^/][^/]*$%%'` -case $dirname in - "") # Do nothing - ;; - /* | [A-z]:/*) # Absolute name - PATH="$dirname$SEP$PATH" - export PATH ;; - *) # Relative name - PATH="`pwd`/$dirname$SEP$PATH" - export PATH ;; -esac - -if tty -s; then verbose=true; else verbose=false; fi -dry_run=false -trees= - -# initialize treefile by either mktemp or some random name -# code taken from pdfjam and adjusted -{ - treefile=` - (umask 077 && mktemp "${TMPDIR-/tmp}/mktexlsrtrees.XXXXXXXXXX") 2>/dev/null - ` && test -n "$treefile" && test -f "$treefile" -} || { - ## We'll use awk to make random number, for portability - random=`awk 'END { srand(); printf ("%d\n", rand()*1000000); }' /dev/null` - treefile="${TMPDIR-/tmp}/mktexlsrtrees$$.$random" -} || exit $? - -trap 'cd /; rm -f $treefile; test -z "$db_dir_tmp" || rm -rf "$db_dir_tmp"; - exit' 0 1 2 3 7 13 15 - -# A copy of some stuff from mktex.opt, so we can run in the presence of -# terminally damaged ls-R files. -while test $# -gt 0; do - if test "x$1" = x--help || test "x$1" = x-help; then - echo "$usage" - exit 0 - elif test "x$1" = x--version || test "x$1" = x-version; then - echo "`basename $0` $version" - kpsewhich --version - exit 0 - elif test "x$1" = x--verbose || test "x$1" = x-verbose; then - verbose=true - elif test "x$1" = x--dry-run || test "x$1" = x-n; then - dry_run=true - elif test "x$1" = x--quiet || test "x$1" = x--silent \ - || test "x$1" = x-quiet || test "x$1" = x-silent ; then - verbose=false - elif test "x$1" = x--; then - : - elif echo "x$1" | grep '^x-' >/dev/null; then - echo "$progname: unknown option \`$1', try --help if you need it." >&2 - exit 1 - else - if test ! -d "$1"; then - echo "$progname: $1: not a directory, skipping." >&2 - shift - continue - fi - # By saving the argument in a file, we can later get it back while - # supporting spaces in the name. This still doesn't support - # newlines in the directory names, but nobody ever complains about - # that, and it seems much too much trouble to use \0 terminators. - (umask 077 - if echo "$1" >>"$treefile"; then :; else - echo "$progname: $treefile: could not append to arg file, goodbye." >&2 - exit 1 - fi - ) - fi - shift -done - -# mktexupd and mktexlsr make sure they're coordinated via this. A copy -# is found mktex.opt. -ls_R_magic='% ls-R -- filename database for kpathsea; do not change this line.' -# The old string, which should continue to work. -old_ls_R_magic='% ls-R -- maintained by MakeTeXls-R; do not change this line.' - -{ - # Get list of directories from the explicit arguments (now saved in - # $treefile), or $TEXMFDBS if no explicit args. Eliminate duplicates. - saveIFS=$IFS # break only at newline - IFS=' -' - if test -s "$treefile"; then - set x `sort "$treefile" | uniq` - else - set x `kpsewhich --show-path=ls-R | tr : ' -' | sort | uniq` - fi - IFS=$saveIFS - shift -} - -for TEXMFLS_R in "$@"; do - # Prepend cwd if the directory was relative. - case "$TEXMFLS_R" in - "") continue ;; # Strictly speaking, it is an error if this case is taken. - /* | [A-z]:/*) ;; - *) TEXMFLS_R="`pwd`/$TEXMFLS_R" - esac - # Allow for either ls-R and ls-r to exist. But create ls-R if we're - # working from scratch. - if test -f "$TEXMFLS_R/ls-R"; then - db_file="$TEXMFLS_R/ls-R" - elif test -f "$TEXMFLS_R/ls-r"; then - db_file="$TEXMFLS_R/ls-r" - else - db_file="$TEXMFLS_R/ls-R" - fi - # Follow a possible symlink to get the right filesystem. - # The '|| true' construct prevents an sh -e aborting. - db_readlink=`kpsereadlink "$TEXMFLS_R/ls-R" 2>/dev/null` || true - case "$db_readlink" in - "") ;; - /* | [A-z]:/*) db_file="$db_readlink" ;; - *) db_file="$TEXMFLS_R/$db_readlink" - esac - db_dir=`echo "$db_file" | sed 's%/[^/][^/]*$%%'` # can't rely on dirname - - # want to be silent if the directory doesn't exist, since the ls-R - # path ordinarily contains many nonexistent directories. - test -d "$db_dir" || continue - test -w "$db_dir" || { echo "$progname: $db_dir: directory not writable. Skipping..." >&2; continue; } - - if test ! -f "$db_file"; then - cp /dev/null "$db_file" - # Use same permissions as parent directory, minus x,s, or t bits. - chmod `kpsestat -xst "$db_dir"` "$db_file" - elif test -s "$db_file" \ - && test "x`sed '1s/
$//;1q' \"$db_file\"`" != "x$ls_R_magic" \ - && test "x`sed '1s/
$//;1q' \"$db_file\"`" != "x$old_ls_R_magic"; then - echo "$progname: $db_file: no magic string, skipping..." >&2 - continue - fi - - # Skip if we cannot write the file: - kpseaccess -w "$db_file" || { echo "$progname: $db_file: no write permission, skipping..." >&2; continue; } - - db_dir_tmp="$db_dir/lsR$$.tmp" - (umask 077 && mkdir "$db_dir_tmp" ) \ - || { echo "$progname: $db_dir_tmp: could not create directory, skipping..." >&2; continue; } - db_file_tmp="$db_dir_tmp/lsR$$.tmp" - rm -f "$db_file_tmp" - - $verbose && echo "$progname: Updating $db_file... " - $dry_run && continue - - echo "$ls_R_magic" >"$db_file_tmp" - - # The main task. We put ./: in the output, so top-level files can be - # found via ls-R. Probably irrelevant in practice. The sed command - # inserts the leading ./ for directory names, and removes ., .., and - # version control entries from the list. Also omit contents of any - # the version directories; sed apparently requires that we do that - # operation in a separate invocation. We do not try to support colons - # in directory names. - # - echo "./:" >>"$db_file_tmp" - vc_dirs='\.\(bzr\|git\|hg\|svn\)\|_darcs' - (cd "$TEXMFLS_R" && \ls -LRa 2>/dev/null) \ - | sed -e '/^$/{n;s%^\./%%;s%^%./%;}; /^\.$/d; /^\.\.$/d; /^'$vc_dirs'$/d;' \ - -e '/^[\.\/]*lsR[0-9]*\.tmp:*$/d' \ - | sed -e /$vc_dirs'.*:$/,/^$/d' \ - >>"$db_file_tmp" - - # To be really safe, a loop. - until PERMS=`kpsestat = "$db_file"`; do sleep 1; done - chmod $PERMS "$db_file_tmp" - rm -f "$db_file" - mv "$db_file_tmp" "$db_file" - rm -rf "$db_dir_tmp" -done - -$verbose && echo "$progname: Done." -exit 0 +../../texmf-dist/scripts/texlive/mktexlsr
\ No newline at end of file diff --git a/Master/bin/x86_64-solaris/mktexmf b/Master/bin/x86_64-solaris/mktexmf index bb868c12a8d..302c00f763e 100755..120000 --- a/Master/bin/x86_64-solaris/mktexmf +++ b/Master/bin/x86_64-solaris/mktexmf @@ -1,151 +1 @@ -#!/bin/sh -# original mktexmf -- make a new MF file, because one wasn't found. -# -# (If you change or delete the word `original' on the previous line, -# installation won't write this script over yours.) -# -# Originally written by Thomas Esser. -# Public domain. - -version='$Id: mktexmf 34656 2014-07-18 23:38:50Z karl $' - -# preferentially use subprograms from our own directory. -mydir=`echo "$0" | sed 's,/[^/]*$,,'` -mydir=`cd "$mydir" && pwd` -PATH="$mydir:$PATH"; export PATH - -usage="Usage: $0 FONT. - -Makes the Metafont source file for FONT, if possible. For example, -\`ecr12' or \`cmr11'. - -Report bugs to: tex-k@tug.org -TeX Live home page: <http://tug.org/texlive/> -" - -# Common code for all scripts. -: ${MT_TEXMFMAIN=`kpsewhich --expand-path='$TEXMFMAIN'`} -: ${MT_MKTEX_OPT=`kpsewhich --format='web2c files' mktex.opt`} -test -n "$MT_MKTEX_OPT" || MT_MKTEX_OPT="$MT_TEXMFMAIN/web2c/mktex.opt" -if test ! -f "$MT_MKTEX_OPT"; then - echo "$progname: Cannot find mktex.opt; check your installation." >&2 - exit 1 -fi - -. "$MT_MKTEX_OPT" - -( -# See comments in mktexpk. -name="`echo $1 | sed 's%.*/%%; s%\.mf$%%'`" -rootname=`echo "$name" | sed 's/[0-9]*$//'` -pointsize=`echo "$name" | sed "s/^$rootname//"` - -sauterroot=`kpsewhich b-$rootname.mf 2>/dev/null` -if test -n "$sauterroot"; then - rootfile=$sauterroot - rootname=b-$rootname -else - case $name in - # csso12[0-5][0-9] from CJK package; unsupported by mktexmf - csso12[0-5][0-9]) - rootfile=;; - *) - case $rootname in - cs*|lcsss*|icscsc*|icstt*|ilcsss*) - rootfile=`kpsewhich cscode.mf`;; - wn[bcdfirstuv]*|rx[bcdfiorstuvx][bcfhilmostx]|l[abcdhl][bcdfiorstuvx]*) - lhprefix=`echo "$name" | sed 's/^\(..\).*/\1/'` - rootfile=`kpsewhich ${lhprefix}codes.mf 2>/dev/null`;; - *) - rootfile=`kpsewhich $rootname.mf 2>/dev/null`;; - esac;; - esac -fi -{ test -z "$rootfile" || test ! -f "$rootfile"; } && exit 1 - -#if test -z "$MT_MFNAME"; then -OIFS=$IFS; IFS=$SEP -set x `"$MT_MKTEXNAM" $name`; shift -IFS=$OIFS -MT_MFNAME="$3" -#fi - -destdir=`echo "$MT_MFNAME" | sed 's%/[^/][^/]*$%%'` -test -d "$destdir" || "$MT_MKTEXDIR" "$destdir" || exit 1 -cd "$destdir" || exit 1 - -case "$pointsize" in - "") echo "$progname: no pointsize."; exit 1;; - 11) realsize=10.95;; # \magstephalf - 14) realsize=14.4;; # \magstep2 - 17) realsize=17.28;; # \magstep3 - 20) realsize=20.74;; # \magstep4 - 25) realsize=24.88;; # \magstep5 - 30) realsize=29.86;; # \magstep6 - 36) realsize=35.83;; # \magstep7 - # The new convention is to have three or four letters for the - # font name and four digits for the pointsize. The number is - # pointsize * 100. We effectively divide by 100 by ignoring the - # last two digits. - ????|?????) realsize=`echo "$pointsize" | sed 's/\(..\)$/.\1/'`;; - *) realsize="$pointsize";; -esac - -mfname="$name.mf" -if test -r "$mfname"; then - echo "$progname: $destdir/$mfname already exists." - echo "$destdir/$mfname" >$STDOUT - "$MT_MKTEXUPD" "$destdir" "$mfname" - exit 0 -fi - -case "$name" in - ec*|tc*) - cat > "mf$$.tmp" <<END -if unknown exbase: input exbase fi; -gensize:=$realsize; -generate $rootname; -END - ;; - dc*) - cat > "mf$$.tmp" <<END -if unknown dxbase: input dxbase fi; -gensize:=$realsize; -generate $rootname; -END - ;; - cs*|lcsss*|icscsc*|icstt*|ilcsss*) - cat > "mf$$.tmp" <<END -input cscode -use_driver; -END - ;; - wn[bcdfirstuv]*|rx[bcdfiorstuvx][bcfhilmostx]*|l[abcdhl][bcdfiorstuvx]*) - cat > "mf$$.tmp" <<END -input fikparm; -END - ;; - g[lmorst][bijmtwx][cilnoru]*) - # A small superset of the names of the cbgreek fonts. - cat > "mf$$.tmp" <<END -% generated by mktexmf -input cbgreek; -END - ;; - *) - cat > "mf$$.tmp" <<END -design_size := $realsize; -input $rootname; -END - ;; -esac - -chmod `kpsestat -xst,go-w .` "mf$$.tmp" -rm -f "$mfname" -mv "mf$$.tmp" "$mfname" - -echo "$destdir/$mfname" >$STDOUT -echo "$progname: $destdir/$mfname: successfully generated." >&2 -"$MT_MKTEXUPD" "$destdir" "$mfname" -exit 0 -) 1>&2 </dev/null +../../texmf-dist/scripts/texlive/mktexmf
\ No newline at end of file diff --git a/Master/bin/x86_64-solaris/mktexpk b/Master/bin/x86_64-solaris/mktexpk index 2672dc7f78c..a0d6db0121b 100755..120000 --- a/Master/bin/x86_64-solaris/mktexpk +++ b/Master/bin/x86_64-solaris/mktexpk @@ -1,284 +1 @@ -#!/bin/sh -# original mktexpk -- make a new PK font, because one wasn't found. -# -# (If you change or delete the word `original' on the previous line, -# installation won't write this script over yours.) -# -# Originally written by Thomas Esser, Karl Berry, and Olaf Weber. -# Public domain. - -version='$Id: mktexpk 34656 2014-07-18 23:38:50Z karl $' -progname=`echo $0 | sed 's%.*/%%'` - -# preferentially use subprograms from our own directory. -mydir=`echo "$0" | sed 's,/[^/]*$,,'` -mydir=`cd "$mydir" && pwd` -PATH="$mydir:$PATH"; export PATH - -usage="Usage: $progname [OPTIONS] NAME [REDIRECT], - Create a PK font. - ---dpi DPI use resolution DPI. ---bdpi BDPI use base resolution BDPI. ---mag MAG use magnificiation MAG. ---mfmode MODE use MODE as the METAFONT mode. ---destdir DESTDIR write fonts in DESTDIR. - -Try to create a bitmap PK file for NAME at resolution DPI, with an -assumed device base resolution of BDPI, and a Metafont \`mag' of -MAG. Use MODE for the METAFONT mode. Use DESTDIR for the root of where -to install into, either the absolute directory name to use (if it starts -with a /) or relative to the default DESTDIR (if not). REDIRECT, if -supplied, is a string of the form '>&n', where n is the number of the -file descriptor which is to receive, instead of stdout, the name of the -newly created pk file. - -If you expected the font to be available as an outline, and thus this -script does not work and should not have been called, most likely the -font's .tfm name is missing from the relevant map file (e.g., -psfonts.map for dvips, pdftex.map for pdftex). These map files are -typically maintained using updmap; q.v. - -For step-by-step instructions on making new fonts known to TeX, see -http://tug.org/fonts/fontinstall.html. - -Report bugs to: tex-k@tug.org -TeX Live home page: <http://tug.org/texlive/> -" - -# Handle non-positional options, except for --version/--help -while test $# -gt 0; do - case "$1" in - --destdir) shift; DEST="$1"; shift ;; - --destdir=*) DEST=`echo "$1" | sed 's/--destdir=//'`; shift ;; - --dpi) shift; DPI="$1"; shift ;; - --dpi=*) DPI=`echo "$1" | sed 's/--dpi=//'`; shift ;; - --bdpi) shift; BDPI="$1"; shift ;; - --bdpi=*) BDPI=`echo "$1" | sed 's/--bdpi=//'`; shift ;; - --mfmode) shift; test "x$1" != "x/" && MODE="$1"; shift ;; - --mfmode=*) test "x$1" != "x--mfmode/" \ - && MODE=`echo "$1" | sed 's/--mfmode=//'`; shift ;; - --mag) shift; MAG="$1"; shift;; - --mag=*) MAG=`echo "$1" | sed '/s--mag=//'`; shift;; - --version|-version) break ;; - --help|-help) break ;; - *) break ;; - esac -done - -if test "x$2" != x; then - tail="`echo \"x$2\" | sed 's/^x>&//' | grep '^[0-9]*$'`" - if test -z "$tail"; then - echo "$progname: argument '$2' ignored - bad file number" >&2 - elif test "$tail" != 1; then - eval 'exec 1>&$tail' - fi -fi - -mt_max_args=2 - -# Common code for all scripts. -: ${MT_TEXMFMAIN=`kpsewhich --expand-path='$TEXMFMAIN'`} -: ${MT_MKTEX_OPT=`kpsewhich --format='web2c files' mktex.opt`} -test -n "$MT_MKTEX_OPT" || MT_MKTEX_OPT="$MT_TEXMFMAIN/web2c/mktex.opt" -if test ! -f "$MT_MKTEX_OPT"; then - echo "$progname: Cannot find mktex.opt; check your installation." >&2 - exit 1 -fi - -. "$MT_MKTEX_OPT" - -# Where do potential driver files belong? -case "$MT_FEATURES" in - *nomfdrivers*) - : ${MT_MFDESTDIR=`pwd`} - export MT_MFDESTDIR;; -esac - -# Since we want to pass the generated filename and only that filename -# back to the caller on standard output, we do some redirections so -# regular echo's will end up on stderr, and do an echo >$STDOUT at the end. -# Then the contents of $STDOUT will be echoed to stdout by a trap. - -# start of redirection stdout -> stderr, stdin <- /dev/null -( - -NAME=$1 - -if kpsewhich $NAME.mf >/dev/null 2>&1 || mktexmf $NAME >/dev/null 2>&1; then - # determine the progname of metafont to use; prefer mf-nowin. - if (mf-nowin --version) >/dev/null 2>&1; then - MF="mf-nowin -progname=mf" - else - MF=mf - fi - - # Check that $BDPI and $MODE are consistent; if not, ignore the mode and - # hope we can correctly guess it from bdpi. (People like to specify the - # resolution on the command line, not the mode so much.) - if test -n "$MODE"; then - mf_bdpi=`$MF \ -'\mode:='$MODE';mode_setup;message"BDPI= "&decimal round pixels_per_inch;end.'\ - </dev/null \ - | awk '/DPI=/ {print $2}'` - if test "x$mf_bdpi" != x$BDPI; then - echo "$progname: Mismatched mode $MODE and resolution $BDPI; ignoring mode." >&2 - MODE= - fi - fi - - # If an explicit mode is not supplied, try to guess. You can get a - # list of extant modes from ftp://ftp.tug.org/tex/modes.mf. - if test -z "$MODE" || test "x$MODE" = xdefault; then - case "$BDPI" in - 85) MODE=sun;; - 100) MODE=nextscrn;; - 180) MODE=toshiba;; - 300) MODE=cx;; - 360) MODE=epstylus;; - 400) MODE=nexthi;; - 600) MODE=ljfour;; - 720) MODE=epscszz;; - 1200) MODE=ultre;; - 1270) MODE=linoone;; - 8000) MODE=dpdfezzz;; - *) echo "$progname: Can't guess mode for $BDPI dpi devices." >&2 - echo "$progname: Use a config file or option to specify the mode; see:" >&2 - echo "$progname: http://tug.org/texinfohtml/kpathsea.html#Unable-to-generate-fonts" >&2 - exit 1 - esac - fi - - # Run Metafont. Always use plain Metafont, since reading cmbase.mf - # does not noticeably slow things down. - cmd="$MF \mode:=$MODE; mag:=$MAG; nonstopmode; input $NAME" -else - MODE=modeless - # ps_to_pk is set in mktex.opt - case $ps_to_pk in - gsftopk) - if $ps_to_pk -t "$NAME"; then - cmd="$ps_to_pk $NAME $DPI" - fi;; - ps2pk) - # grep for the font in $PSMAPFILE. These are base font names, such as - # rpplr (the original) or pplr0 (an interim step) or pplr8r (current). - : ${PSMAPFILE=`kpsewhich --format=map psfonts.map ps2pk.map`} - pattern="^$NAME"'([ ]|$)' - psline=`egrep "$pattern" $PSMAPFILE | tail -1` - if test -n "$psline"; then - set x `echo "$psline" | sed 's%[<["]%%g'` - shift; shift; shift; - encoding=; psname=; slant=; extend= - while test ! -z "$1"; do - case "$1" in - *.enc) encoding="-e $1";; - *.pf[ab]) psname="$1";; - *SlantFont) slant="-S $lastopt";; - *ExtendFont) extend="-E $lastopt";; - esac - lastopt="$1" - shift - done - # Guessing the name of the type1 font file as fallback: - ANAME=`echo $NAME | sed 's/8r$/8a/'` - for i in $NAME.pfa $NAME.pfb $ANAME.pfa $ANAME.pfb; do - if kpsewhich $i >/dev/null 2>&1; then - psname=$i - break - fi - done - - if [ -n "$psname" ]; then - cmd="ps2pk -v -X$DPI -R$BDPI $slant $extend $encoding $psname $NAME.${DPI}pk" - else - if gsftopk -t "$NAME"; then - echo "$progname: cannot find $NAME.pfa or $NAME.pfb. Trying gsftopk." >&2 - cmd="gsftopk $NAME $DPI" - fi - fi - fi;; - esac - - # unsupported by $ps_to_pk, try other conversions: - if test -z "$cmd"; then - if (ttf2pk -t -q $NAME) >/dev/null 2>&1; then - cmd="ttf2pk -q $NAME $DPI" - elif (hbf2gf -t -q $NAME) >/dev/null 2>&1; then - cmd="hbf2gf -q -p $NAME $DPI" - else - echo "$progname: don't know how to create bitmap font for $NAME." >&2 - echo "$progname: perhaps $NAME is missing from the map file." >&2 - exit 1 - fi - fi -fi - -OIFS=$IFS; IFS=$SEP -set x `"$MT_MKTEXNAM" $NAME $DPI $MODE $DEST`; shift -IFS=$OIFS - -PKDEST="$1" -PKDESTDIR=`echo "$PKDEST" | sed 's%/[^/][^/]*$%%'` # can't rely on dirname -PKNAME=`basename "$PKDEST"` -GFNAME=$NAME.${DPI}gf - -if test -r "$PKDESTDIR/$PKNAME"; then - echo "$progname: $PKDESTDIR/$PKNAME already exists." >&2 - echo "$PKDESTDIR/$PKNAME" >$STDOUT - "$MT_MKTEXUPD" "$PKDESTDIR" $PKNAME - exit 0 -fi - -"$MT_MKTEXDIR" "$PKDESTDIR" -if test ! -d "$PKDESTDIR"; then - echo "$progname: $MT_MKTEXDIR $PKDESTDIR failed." >&2 - exit 1 -fi - -echo "$progname: Running $cmd" -$cmd </dev/null || { - # Don't abort if only "Strange path", "bad pos" or "angle(0,0)" - # errors occurr. - grep '^!' $NAME.log | sort >$$.errs 2>/dev/null - grep '^! Strange path' $$.errs >$$.strange 2>/dev/null - grep '^! bad pos.' $$.errs >$$.badpos 2>/dev/null - grep '^! angle(0,0) is taken as zero.' $$.errs >$$.angle 2>/dev/null - cat $$.badpos $$.strange $$.angle | sort > $$.errs_accept - if cmp $$.errs $$.errs_accept >/dev/null 2>&1; then - test -s $$.strange >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused strange path errors." >&2 - test -s $$.badpos >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused bad pos errors." >&2 - test -s $$.angle >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused angle(0,0) errors." >&2 - else - echo "$progname: \`$cmd' failed." >&2 - test -s $NAME.log && mv -f $NAME.log "$KPSE_DOT" - exit 1; - fi -} - -test -r $GFNAME && { gftopk ./$GFNAME $PKNAME || exit 1; } -test ! -f $PKNAME && test -f $NAME.${DPI}pk && mv $NAME.${DPI}pk $PKNAME -if test ! -s $PKNAME; then - echo "$progname: \`$cmd' failed to make $PKNAME." >&2 - exit 1 -fi - -# Install the PK file carefully, since others may be working simultaneously. -# Use cp when mv fails, since DOS will fail mv for deeply-nested directories. -mv $PKNAME "$PKDESTDIR/pk$$.tmp" 2>/dev/null \ - || cp $PKNAME "$PKDESTDIR/pk$$.tmp" || exit 1 -cd "$PKDESTDIR" || exit 1 -chmod `kpsestat -xst,go-w .` pk$$.tmp -test -r $PKNAME || mv pk$$.tmp $PKNAME || exit 1 - -# Update ls-R if necessary. -"$MT_MKTEXUPD" "$PKDESTDIR" $PKNAME - -# If this line (or an equivalent) is not present, dvipsk/xdvik/dviljk -# will think mktexpk failed. Any other output to stdout will also lose. -echo "$PKDESTDIR/$PKNAME" >$STDOUT -echo "$progname: $PKDESTDIR/$PKNAME: successfully generated." >&2 -) 1>&2 </dev/null +../../texmf-dist/scripts/texlive/mktexpk
\ No newline at end of file diff --git a/Master/bin/x86_64-solaris/mktextfm b/Master/bin/x86_64-solaris/mktextfm index 46e30a9c5dc..70ae3a438ce 100755..120000 --- a/Master/bin/x86_64-solaris/mktextfm +++ b/Master/bin/x86_64-solaris/mktextfm @@ -1,162 +1 @@ -#!/bin/sh -# original mktextfm -- make a new TFM file, because one wasn't found. -# -# (If you change or delete the word `original' on the previous line, -# installation won't write this script over yours.) -# -# Primarily written by Thomas Esser, Karl Berry, and Olaf Weber. -# Public domain. - -version='$Id: mktextfm 34656 2014-07-18 23:38:50Z karl $' -progname=`echo $0 | sed 's%.*/%%'` - -# preferentially use subprograms from our own directory. -mydir=`echo "$0" | sed 's,/[^/]*$,,'` -mydir=`cd "$mydir" && pwd` -PATH="$mydir:$PATH"; export PATH - -usage="Usage: $progname [--destdir DESTDIR] FONT. - -Makes a TFM file for FONT, if possible. Use DESTDIR for the root of where -to install into, either the absolute directory name to use (if it starts -with a /) or relative to the default DESTDIR (if not). - -Report bugs to: tex-k@tug.org -TeX Live home page: <http://tug.org/texlive/> -" - -# Handle non-positional options, except for --version/--help -while test $# -gt 0; do - case "$1" in - --destdir) shift; DEST="$1"; shift ;; - --destdir=*) DEST=`echo "$1" | sed 's/--destdir=//'`; shift ;; - --version|-version) break ;; - --help|-help) break ;; - *) break ;; - esac -done - -# Common code for all scripts. -: ${MT_TEXMFMAIN=`kpsewhich --expand-path='$TEXMFMAIN'`} -: ${MT_MKTEX_OPT=`kpsewhich --format='web2c files' mktex.opt`} -test -n "$MT_MKTEX_OPT" || MT_MKTEX_OPT="$MT_TEXMFMAIN/web2c/mktex.opt" -if test ! -f "$MT_MKTEX_OPT"; then - echo "$progname: Cannot find mktex.opt; check your installation." >&2 - exit 1 -fi - -. "$MT_MKTEX_OPT" - -# Where do potential mf driver files go? -case "$MT_FEATURES" in - *nomfdrivers*) - : ${MT_MFDESTDIR=`pwd`} - export MT_MFDESTDIR;; -esac - -# start of redirection stdout -> stderr, stdin <- /dev/null -( - -NAME=`basename "$1" .tfm` -MAG=1 # mag=0 fails with larm1000.mf -#DEST="$2" -DPI=$BDPI - -OIFS=$IFS; IFS=$SEP -set x `"$MT_MKTEXNAM" $NAME $DPI $MODE $DEST`; shift -IFS=$OIFS - -PKDEST="$1" -TFMDEST="$2" -PKDESTDIR=`echo "$PKDEST" | sed 's%/[^/][^/]*$%%'` # can't rely on dirname -TFMDESTDIR=`echo "$TFMDEST" | sed 's%/[^/][^/]*$%%'` -PKNAME=`basename "$PKDEST"` -TFMNAME=$NAME.tfm -GFNAME=$NAME.$DPI'gf' - -if test -r "$TFMDESTDIR/$TFMNAME"; then - echo "$progname: $TFMDESTDIR/$TFMNAME already exists." >&2 - echo "$TFMDESTDIR/$TFMNAME" >$STDOUT - "$MT_MKTEXUPD" "$TFMDESTDIR" $TFMNAME - exit -fi - -# Try to create the destdir first. Do not create fonts, if this fails. -"$MT_MKTEXDIR" "$TFMDESTDIR" -if test ! -d "$TFMDESTDIR"; then - echo "$progname: mktexdir $TFMDESTDIR failed." - exit 1 -fi - -# Check if this font is supported by hbf2gf else use metafont. -if (hbf2gf -q -t $NAME) >/dev/null 2>&1; then - cmd="hbf2gf -g $NAME $DPI" -else - # determine the progname of metafont to use; prefer mf-nowin. - if (mf-nowin --version) >/dev/null 2>&1; then - MF="mf-nowin -progname=mf" - else - MF=mf - fi - - cmd="$MF \mode:=$MODE; mag:=$MAG; nonstopmode; input $NAME" -fi - -echo "$progname: Running $cmd" -$cmd </dev/null || { - # Don't abort if only "Strange path", "bad pos" or "angle(0,0)" - # errors occurr. - grep '^!' $NAME.log | sort >$$.errs 2>/dev/null - grep '^! Strange path' $$.errs >$$.strange 2>/dev/null - grep '^! bad pos.' $$.errs >$$.badpos 2>/dev/null - grep '^! angle(0,0) is taken as zero.' $$.errs >$$.angle 2>/dev/null - cat $$.badpos $$.strange $$.angle | sort > $$.errs_accept - if cmp $$.errs $$.errs_accept >/dev/null 2>&1; then - test -s $$.strange >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused strange path errors." >&2 - test -s $$.badpos >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused bad pos errors." >&2 - test -s $$.angle >/dev/null 2>&1 \ - && echo "$progname: warning: \`$cmd' caused angle(0,0) errors." >&2 - else - echo "$progname: \`$cmd' failed." >&2 - test -s $NAME.log && mv -f $NAME.log "$KPSE_DOT" - exit 1; - fi -} - -# hbf2gf just produces a .pl file: -test -r ./$NAME.pl && pltotf ./$NAME.pl $TFMNAME -test -r $TFMNAME || { echo "$progname: \`$cmd' failed to make $TFMNAME."; exit 1; } - -# Install the TFM file carefully, since others may be working simultaneously. -# Use cp when mv fails, since DOS will fail mv for deeply-nested directories. -mv $TFMNAME "$TFMDESTDIR/tfm$$.tmp" 2>/dev/null \ - || cp $TFMNAME "$TFMDESTDIR/tfm$$.tmp" || exit 1 -cd "$TFMDESTDIR" || exit 1 -chmod `kpsestat -xst,go-w .` tfm$$.tmp -test -r $TFMNAME || mv tfm$$.tmp $TFMNAME || exit 1 - -# OK, success with the TFM. -"$MT_MKTEXUPD" "$TFMDESTDIR" $TFMNAME -echo "$TFMDESTDIR/$TFMNAME" >$STDOUT -echo "$progname: $TFMDESTDIR/$TFMNAME: successfully generated." >&2 - -# Since we probably made a GF(->PK) file, too, may as well install it if -# it's needed. -cd $TEMPDIR -if test -r $GFNAME && test ! -f "$PKDESTDIR/$PKNAME"; then - gftopk ./$GFNAME $PKNAME || exit 1 - "$MT_MKTEXDIR" "$PKDESTDIR" - mv $PKNAME "$PKDESTDIR/pk$$.tmp" 2>/dev/null \ - || cp $PKNAME "$PKDESTDIR/pk$$.tmp" || exit 1 - cd "$PKDESTDIR" || exit 1 - if test -f $PKNAME; then - rm -f pk$$.tmp - else - chmod `kpsestat -xst,go-w .` pk$$.tmp - mv pk$$.tmp $PKNAME - "$MT_MKTEXUPD" "$PKDESTDIR" $PKNAME - fi -fi -) 1>&2 </dev/null +../../texmf-dist/scripts/texlive/mktextfm
\ No newline at end of file diff --git a/Master/texmf-dist/scripts/texlive/README b/Master/texmf-dist/scripts/texlive/README new file mode 100644 index 00000000000..cee1d0fe37f --- /dev/null +++ b/Master/texmf-dist/scripts/texlive/README @@ -0,0 +1,32 @@ +$Id$ +Master/texmf-dist/scripts/texlive +(This file is public domain.) + +This directory contains scripts for TeX Live. Unlike everything else +under Master/texmf-dist/scripts (and most of the rest of Master), most +of these scripts are actually maintained here, and not under Build. + +There are slave copies of these Master-maintained scripts in +Build/source/texk/texlive/linked_scripts, just as for the multitude of +scripts updated from CTAN. + +(Perhaps at some point we will move things around to make this true for +all the scripts here, instead of just most. The remainder now are in +Build/source/texk/texlive/tl_scripts.) + +One reason for doing this is so we can have $Id$ expansion, so +svn:keywords is set for the scripts maintained here. When they were +maintained in Build, the --version option and doc of the copies in bin/ +would become a literal "$Id$", because svn->git mirror process does not +preserve $Id$ strings. (Note from Karl: Although many people and +processes hate keyword expansion, I'm afraid that I find it quite +useful, so I don't want to give it up as long as I am working here. Feel +free to change it when I'm gone. :) + +Another reason is that almost all scripts in the bin/*/ directories are +now symlinks into texmf-dist/scripts/, so it's nice for these to follow +suit for consistency and clarity. + +The principal mailing list is http://lists.tug.org/tex-live. + +All of these scripts are free software, mostly public domain. diff --git a/Build/source/texk/kpathsea/mktexlsr b/Master/texmf-dist/scripts/texlive/mktexlsr index bd3eb50d6e4..bd3eb50d6e4 100755 --- a/Build/source/texk/kpathsea/mktexlsr +++ b/Master/texmf-dist/scripts/texlive/mktexlsr diff --git a/Build/source/texk/kpathsea/mktexmf b/Master/texmf-dist/scripts/texlive/mktexmf index f6b8991e8d1..f6b8991e8d1 100755 --- a/Build/source/texk/kpathsea/mktexmf +++ b/Master/texmf-dist/scripts/texlive/mktexmf diff --git a/Build/source/texk/kpathsea/mktexpk b/Master/texmf-dist/scripts/texlive/mktexpk index 4eaafb1d94e..4eaafb1d94e 100755 --- a/Build/source/texk/kpathsea/mktexpk +++ b/Master/texmf-dist/scripts/texlive/mktexpk diff --git a/Build/source/texk/kpathsea/mktextfm b/Master/texmf-dist/scripts/texlive/mktextfm index d2c132aad89..d2c132aad89 100755 --- a/Build/source/texk/kpathsea/mktextfm +++ b/Master/texmf-dist/scripts/texlive/mktextfm |