diff options
author | Norbert Preining <preining@logic.at> | 2008-02-09 12:15:17 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2008-02-09 12:15:17 +0000 |
commit | 2c01b171633cb5abd6ec85996cf41c2da5608bae (patch) | |
tree | 097e355f9846735e1f945dc9a97f2859141357db /Master/install-tl.pl | |
parent | bf376fbece77d76a816dd70f520ebf4c8840f33d (diff) |
support for symlinks and format creation
git-svn-id: svn://tug.org/texlive/trunk@6583 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/install-tl.pl')
-rwxr-xr-x | Master/install-tl.pl | 58 |
1 files changed, 55 insertions, 3 deletions
diff --git a/Master/install-tl.pl b/Master/install-tl.pl index a17ca6900f2..f25b072d832 100755 --- a/Master/install-tl.pl +++ b/Master/install-tl.pl @@ -8,10 +8,10 @@ # or any later version. # # TODO: -# - support for setting up links to sys dirs # - support option_fmt (generation of formats) # partially done, missing fmtutil-sys for windows # - support option_paper (paper instead of A4) +# missing my $svnrev = '$Revision$'; $svnrev =~ m/: ([0-9]+) /; @@ -807,8 +807,13 @@ sub do_postinst_stuff { # now work through the options if specified at all - # first the generate all formats option - if ($vars{'option_format'}) { + # letter instead of a4 + if ($vars{'option_letter'}) { + tllog($::LOG_NORMAL, "letter option not implemented yet, please wait\n"); + } + + # all formats option + if ($vars{'option_fmt'}) { tllog($::LOG_NORMAL, "pre-generation all format file (fmtutil-sys --all)\n"); if (win32()) { tllog($::LOG_NORMAL, "missing fmtutil-sys, sorry, please wait!\n"); @@ -817,6 +822,53 @@ sub do_postinst_stuff { } } + # option_links + if ($vars{'option_symlinks'}) { + # bin files + my @files; + mkdirhier $vars{'sys_bin'}; + if (-w $vars{'sys_bin'}) { + tllog($::LOG_NORMAL, "linking binaries to $vars{'sys_bin'}\n"); + @files = `ls $plat_bindir`; + chomp(@files); + `cd "$vars{'sys_bin'}" && rm -f @files`; + `ln -s "$plat_bindir/"* "$vars{'sys_bin'}"`; + } else { + tllog($::LOG_NORMAL, "destination of bin symlink $vars{'sys_bin'} not writable, no linking of bin files done!\n"); + } + # info files + mkdirhier $vars{'sys_info'}; + if (-w $vars{'sys_info'}) { + tllog($::LOG_NORMAL, "linking info pages to $vars{'sys_info'}\n"); + @files = `ls "$TEXDIR/texmf/doc/info"`; + chomp(@files); + `cd "$vars{'sys_info'}" && rm -f @files`; + `ln -s "$TEXDIR/texmf/doc/info/"*info* "$vars{'sys_info'}"`; + } else { + tllog($::LOG_NORMAL, "destination of info symlink $vars{'sys_info'} not writable, no linking of info files done!\n"); + } + # man files + mkdirhier $vars{'sys_man'}; + if (-w $vars{'sys_man'}) { + tllog($::LOG_NORMAL, "linking man pages to $vars{'sys_man'}\n"); + my $foo = `(cd "$TEXDIR/texmf/doc/man" && echo *)`; + my @mans = split ' ', $foo; + chomp(@mans); + foreach my $m (@mans) { + my $mandir = "$TEXDIR/texmf/doc/man/$m"; + next unless -d $mandir; + mkdirhier "$vars{'sys_man'}/$m"; + next unless -w "$vars{'sys_man'}/$m"; + @files = `ls "$mandir"`; + chomp(@files); + `cd "$vars{'sys_man'}/$m" && rm -f @files`; + `ln -s "$mandir/"* "$vars{'sys_man'}/$m"`; + } + } else { + tllog($::LOG_NORMAL, "destination of man symlink $vars{'sys_man'} not writable, no linking of man files done!\n"); + } + } + # old installer: #$config && texconfig-sys init #$config || echo "PLEASE RUN texconfig or texconfig-sys to make new formats." |