diff options
author | Norbert Preining <preining@logic.at> | 2008-12-25 23:36:48 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2008-12-25 23:36:48 +0000 |
commit | 7f387c3f9d7a30233eb5646730f63b101cc92ba0 (patch) | |
tree | df89533231acd5516c6cae2fec39ef600b6feb78 /Master | |
parent | b0729282be04682a746efb389405c584fe6df35c (diff) |
tlmgr2: add an action symlinks to add and remove symlinks
git-svn-id: svn://tug.org/texlive/trunk@11718 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rwxr-xr-x | Master/texmf/scripts/texlive/tlmgr2.pl | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/Master/texmf/scripts/texlive/tlmgr2.pl b/Master/texmf/scripts/texlive/tlmgr2.pl index 1217f39a787..32ebe5c7cd1 100755 --- a/Master/texmf/scripts/texlive/tlmgr2.pl +++ b/Master/texmf/scripts/texlive/tlmgr2.pl @@ -352,6 +352,9 @@ sub execute_action { merge_into(\%ret, action_backup()); } elsif ($action =~ m/^restore$/i) { merge_into(\%ret, action_restore()); + } elsif ($action =~ m/^symlinks$/i) { + merge_into(\%ret, action_symlinks()); + finish(0); } elsif ($action =~ m/^search$/i) { merge_into(\%ret, action_search()); finish(0); @@ -829,6 +832,34 @@ sub action_show { return; } +# SYMLINKS +# +sub action_symlinks { + my %ret; + tlwarn("machine-readable output not supported for search\n") + if $::machinereadble; + my $what = shift @ARGV; + if (!defined($what) || ($what !~ m/^(add|remove)$/i)) { + tlwarn("action symlinks needs one argument, either add or remove\n"); + return; + } + init_local_db(); + if ($what =~ m/^add$/i) { + if (!$localtlpdb->option_create_symlinks) { + tlwarn("Option to create symlinks not set, please do that first!\n"); + return; + } + $localtlpdb->add_symlinks() if $localtlpdb->option_create_symlinks; + } elsif ($what =~ m/^remove$/i) { + # remove symlinks + $localtlpdb->remove_symlinks(); + } else { + # that should not happen + tlwarn("that should not happen, action_symlinks what=$what\n"); + exit 1; + } + return; +} # SEARCH # @@ -3106,6 +3137,9 @@ Possible values for I<key> are: C<srcfiles> (install source files), C<backupdir> (default directory for backups), C<autobackup> (number of backups to keep). + C<sys_bin> (location where binaries are linked to by action symlinks) + C<sys_man> (location where man pages are linked to by action symlinks) + C<sys_info> (location where info pages are linked to by action symlinks) Perhaps the most common use of C<option> is if you originally installed from DVD, and want to permanently change the installation to get further @@ -3130,6 +3164,11 @@ with 0 as the values. In the C<--clean> mode of the C<backup> action this option also specifies the number to be kept. +=head2 symlinks [add|remove] + +Adds or removes symlinks for binaries, man pages, and info pages in the +directories specified by the respective options (see above). + =head2 paper |