summaryrefslogtreecommitdiff
path: root/Master/texmf
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2008-12-19 22:57:33 +0000
committerNorbert Preining <preining@logic.at>2008-12-19 22:57:33 +0000
commitf6bc14e1abf07895c34f8feb1549e34d65bf1889 (patch)
treed47d42a3d065e3fda8c5b4b87392600b7c86d0ab /Master/texmf
parentb2710f561308242d8fdd0779e1377da9d299d118 (diff)
- add TLPDB->add_symlinks and TLPDB->remove_symlinks
- add symlink information to tlmgr2 option - add comment if we should activate it or not git-svn-id: svn://tug.org/texlive/trunk@11657 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf')
-rwxr-xr-xMaster/texmf/scripts/texlive/tlmgr2.pl76
1 files changed, 70 insertions, 6 deletions
diff --git a/Master/texmf/scripts/texlive/tlmgr2.pl b/Master/texmf/scripts/texlive/tlmgr2.pl
index dc6ae55ffa7..49b99664657 100755
--- a/Master/texmf/scripts/texlive/tlmgr2.pl
+++ b/Master/texmf/scripts/texlive/tlmgr2.pl
@@ -1685,6 +1685,14 @@ sub action_update {
}
}
+ # if the option for setting symlinks is called we create them
+ # SHOULD WE DO THAT OR ADD ANOTHER OPTION
+ # symlinks
+ # If we do it we have to add it to action_install and action_remove
+ # too!!!
+ # $localtlpdb->add_symlinks() if $localtlpdb->option_create_symlinks;
+
+
# that already checks whether we actually have to do something
close_w32_updater();
if (($nrupdated == 0) && ($tlmediasrc->media ne "NET") && $opts{"all"}) {
@@ -1841,18 +1849,29 @@ sub action_option {
$what = "show" unless defined($what);
init_local_db();
if ($what =~ m/^show$/i) {
- print "Default installation location (location): ",
+ print "Default installation location (location): ",
$localtlpdb->option_location, "\n";
- print "Create formats on installation (formats): ",
+ print "Create formats on installation (formats): ",
($localtlpdb->option_create_formats ? "yes" : "no"), "\n";
- print "Install documentation files (docfiles): ",
+ print "Install documentation files (docfiles): ",
($localtlpdb->option_install_docfiles ? "yes": "no"), "\n";
- print "Install source files (srcfiles): ",
+ print "Install source files (srcfiles): ",
($localtlpdb->option_install_srcfiles ? "yes": "no"), "\n";
- print "Directory for backups (backupdir): ",
+ print "Create symlinks (symlinks): ",
+ ($localtlpdb->option_create_symlinks ? "yes": "no"), "\n";
+ print "Destination for symlinks for binaries (sys_bin): ",
+ $localtlpdb->option_sys_bin, "\n"
+ if $localtlpdb->option_sys_bin;
+ print "Destination for symlinks for man pages (sys_man): ",
+ $localtlpdb->option_sys_man, "\n"
+ if $localtlpdb->option_sys_man;
+ print "Destination for symlinks for info docs (sys_info): ",
+ $localtlpdb->option_sys_info, "\n"
+ if $localtlpdb->option_sys_info;
+ print "Directory for backups (backupdir): ",
$localtlpdb->option("backupdir"), "\n"
if $localtlpdb->option("backupdir");
- print "Number of backups to keep (autobackup): ",
+ print "Number of backups to keep (autobackup): ",
$localtlpdb->option("autobackup"), "\n"
if $localtlpdb->option("autobackup");
} elsif ($what =~ m/^location$/i) {
@@ -1913,6 +1932,51 @@ sub action_option {
print "Create formats on installation: ",
$localtlpdb->option_create_formats, "\n";
}
+ } elsif ($what =~ m/^symlinks$/i) {
+ # changes the default symlinks
+ my $loc = shift @ARGV;
+ if (defined($loc)) {
+ print "Defaulting to", ($loc ? "" : " not"),
+ " create symlinks in system paths.\n";
+ $localtlpdb->option_create_symlinks($loc);
+ $localtlpdb->save;
+ } else {
+ print "Create symlinks in system paths on installation: ",
+ $localtlpdb->option_create_symlinks, "\n";
+ }
+ } elsif ($what =~ m/^sys_man$/i) {
+ # changes the default sys_man
+ my $loc = shift @ARGV;
+ if (defined($loc)) {
+ info ( "Setting default destination for symlinks to man pages to $loc\n");
+ $localtlpdb->option_sys_man ($loc);
+ $localtlpdb->save;
+ } else {
+ print "Default destination for symlinks to man pages: ",
+ $localtlpdb->option_sys_man, "\n";
+ }
+ } elsif ($what =~ m/^sys_info$/i) {
+ # changes the default sys_info
+ my $loc = shift @ARGV;
+ if (defined($loc)) {
+ info ( "Setting default destination for symlinks to info pages to $loc\n");
+ $localtlpdb->option_sys_info ($loc);
+ $localtlpdb->save;
+ } else {
+ print "Default destination for symlinks to info pages: ",
+ $localtlpdb->option_sys_info, "\n";
+ }
+ } elsif ($what =~ m/^sys_bin$/i) {
+ # changes the default sys_bin
+ my $loc = shift @ARGV;
+ if (defined($loc)) {
+ info ( "Setting default destination for symlinks to binaries to $loc\n");
+ $localtlpdb->option_sys_bin ($loc);
+ $localtlpdb->save;
+ } else {
+ print "Default destination for symlinks to binaries: ",
+ $localtlpdb->option_sys_bin, "\n";
+ }
} elsif (member($what, @AllowedConfigOptions)) {
# for all further options not handled till now we check that they
# appear in the list of allowed options and if they do, we set/read