summaryrefslogtreecommitdiff
path: root/Master/texmf
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-04-29 16:04:09 +0000
committerKarl Berry <karl@freefriends.org>2011-04-29 16:04:09 +0000
commit3a947824f01c49bdaacd8fd12a2c7b222cb60c0d (patch)
treeb52d25354b8e208943bac1bb5f16aab77c0bb020 /Master/texmf
parente41c74bb995dbc1cec2fbc74763bbb9575021a1d (diff)
path doc, wording
git-svn-id: svn://tug.org/texlive/trunk@22250 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf')
-rwxr-xr-xMaster/texmf/scripts/texlive/tlmgr.pl229
1 files changed, 118 insertions, 111 deletions
diff --git a/Master/texmf/scripts/texlive/tlmgr.pl b/Master/texmf/scripts/texlive/tlmgr.pl
index 9b8089c84f3..ed1d55a5498 100755
--- a/Master/texmf/scripts/texlive/tlmgr.pl
+++ b/Master/texmf/scripts/texlive/tlmgr.pl
@@ -921,6 +921,109 @@ sub action_paper {
}
+# PATH
+#
+sub action_path {
+ my $what = shift @ARGV;
+ if (!defined($what) || ($what !~ m/^(add|remove)$/i)) {
+ tlwarn("tlmgr: action path requires add or remove, not: $what\n");
+ return;
+ }
+ init_local_db();
+ my $winadminmode = 0;
+ if (win32()) {
+ #
+ # for w32 we do system wide vs user setting detection as follows:
+ # - if --w32mode is NOT given,
+ # - if admin
+ # --> honor opt_w32_multi_user setting in tlpdb
+ # - if not admin
+ # - if opt_w32_multi_user == NO
+ # --> do user path adjustment
+ # - if opt_w32_multi_user == YES
+ # --> do nothing, warn that the setting is on, suggest --w32mode user
+ # - if --w32mode admin
+ # - if admin
+ # --> ignore opt_w32_multi_user and do system path adjustment
+ # - if non-admin
+ # --> do nothing but warn that user does not have privileges
+ # - if --w32mode user
+ # - if admin
+ # --> ignore opt_w32_multi_user and do user path adjustment
+ # - if non-admin
+ # --> ignore opt_w32_multi_user and do user path adjustment
+ if (!$opts{"w32mode"}) {
+ $winadminmode = $localtlpdb->option("w32_multi_user");
+ if (!TeXLive::TLWinGoo::admin()) {
+ if ($winadminmode) {
+ tlwarn("The TLPDB specifies system wide path adjustments\nbut you don't have admin privileges.\nFor user path adjustment please use\n\t--w32mode user\n");
+ # and do nothing
+ return;
+ }
+ }
+ } else {
+ # we are in the block where a --w32mode argument is given
+ # we reverse the tests:
+ if (TeXLive::TLWinGoo::admin()) {
+ # in admin mode we simply use what is given on the cmd line
+ if ($opts{"w32mode"} eq "user") {
+ $winadminmode = 0;
+ } elsif ($opts{"w32mode"} eq "admin") {
+ $winadminmode = 1;
+ } else {
+ tlwarn("Unknown --w32admin mode: $opts{w32mode}, should be 'admin' or 'user'\n");
+ return;
+ }
+ } else {
+ # we are non-admin
+ if ($opts{"w32mode"} eq "user") {
+ $winadminmode = 0;
+ } elsif ($opts{"w32mode"} eq "admin") {
+ tlwarn("You don't have the privileges to work in --w32mode admin\n");
+ return;
+ } else {
+ tlwarn("Unknown --w32admin mode: $opts{w32mode}, should be 'admin' or 'user'\n");
+ return;
+ }
+ }
+ }
+ }
+ if ($what =~ m/^add$/i) {
+ if (win32()) {
+ TeXLive::TLUtils::w32_add_to_path(
+ $localtlpdb->root . "/bin/win32",
+ $winadminmode);
+ TeXLive::TLWinGoo::broadcast_env();
+ } else {
+ TeXLive::TLUtils::add_symlinks($localtlpdb->root,
+ $localtlpdb->platform(),
+ $localtlpdb->option("sys_bin"),
+ $localtlpdb->option("sys_man"),
+ $localtlpdb->option("sys_info"));
+ }
+ } elsif ($what =~ m/^remove$/i) {
+ if (win32()) {
+ TeXLive::TLUtils::w32_remove_from_path(
+ $localtlpdb->root . "/bin/win32",
+ $winadminmode);
+ TeXLive::TLWinGoo::broadcast_env();
+ } else {
+ # remove symlinks
+ TeXLive::TLUtils::remove_symlinks($localtlpdb->root,
+ $localtlpdb->platform(),
+ $localtlpdb->option("sys_bin"),
+ $localtlpdb->option("sys_man"),
+ $localtlpdb->option("sys_info"));
+ }
+ } else {
+ # that should not happen
+ tlwarn("\nShould not happen, action_path what=$what");
+ exit 1;
+ }
+ return;
+}
+
+
# SHOW
#
sub action_show {
@@ -1065,107 +1168,6 @@ sub action_show {
return;
}
-# PATH
-#
-sub action_path {
- my $what = shift @ARGV;
- if (!defined($what) || ($what !~ m/^(add|remove)$/i)) {
- tlwarn("tlmgr: action path needs one argument, either add or remove\n");
- return;
- }
- init_local_db();
- my $winadminmode = 0;
- if (win32()) {
- #
- # for w32 we do system wide vs user setting detection as follows:
- # - if --w32mode is NOT given,
- # - if admin
- # --> honor opt_w32_multi_user setting in tlpdb
- # - if not admin
- # - if opt_w32_multi_user == NO
- # --> do user path adjustment
- # - if opt_w32_multi_user == YES
- # --> do nothing, warn that the setting is on, suggest --w32mode user
- # - if --w32mode admin
- # - if admin
- # --> ignore opt_w32_multi_user and do system path adjustment
- # - if non-admin
- # --> do nothing but warn that user does not have privileges
- # - if --w32mode user
- # - if admin
- # --> ignore opt_w32_multi_user and do user path adjustment
- # - if non-admin
- # --> ignore opt_w32_multi_user and do user path adjustment
- if (!$opts{"w32mode"}) {
- $winadminmode = $localtlpdb->option("w32_multi_user");
- if (!TeXLive::TLWinGoo::admin()) {
- if ($winadminmode) {
- tlwarn("The TLPDB specifies system wide path adjustments\nbut you don't have admin privileges.\nFor user path adjustment please use\n\t--w32mode user\n");
- # and do nothing
- return;
- }
- }
- } else {
- # we are in the block where a --w32mode argument is given
- # we reverse the tests:
- if (TeXLive::TLWinGoo::admin()) {
- # in admin mode we simply use what is given on the cmd line
- if ($opts{"w32mode"} eq "user") {
- $winadminmode = 0;
- } elsif ($opts{"w32mode"} eq "admin") {
- $winadminmode = 1;
- } else {
- tlwarn("Unknown --w32admin mode: $opts{w32mode}, should be 'admin' or 'user'\n");
- return;
- }
- } else {
- # we are non-admin
- if ($opts{"w32mode"} eq "user") {
- $winadminmode = 0;
- } elsif ($opts{"w32mode"} eq "admin") {
- tlwarn("You don't have the privileges to work in --w32mode admin\n");
- return;
- } else {
- tlwarn("Unknown --w32admin mode: $opts{w32mode}, should be 'admin' or 'user'\n");
- return;
- }
- }
- }
- }
- if ($what =~ m/^add$/i) {
- if (win32()) {
- TeXLive::TLUtils::w32_add_to_path(
- $localtlpdb->root . "/bin/win32",
- $winadminmode);
- TeXLive::TLWinGoo::broadcast_env();
- } else {
- TeXLive::TLUtils::add_symlinks($localtlpdb->root,
- $localtlpdb->platform(),
- $localtlpdb->option("sys_bin"),
- $localtlpdb->option("sys_man"),
- $localtlpdb->option("sys_info"));
- }
- } elsif ($what =~ m/^remove$/i) {
- if (win32()) {
- TeXLive::TLUtils::w32_remove_from_path(
- $localtlpdb->root . "/bin/win32",
- $winadminmode);
- TeXLive::TLWinGoo::broadcast_env();
- } else {
- # remove symlinks
- TeXLive::TLUtils::remove_symlinks($localtlpdb->root,
- $localtlpdb->platform(),
- $localtlpdb->option("sys_bin"),
- $localtlpdb->option("sys_man"),
- $localtlpdb->option("sys_info"));
- }
- } else {
- # that should not happen
- tlwarn("\nShould not happen, action_path what=$what");
- exit 1;
- }
- return;
-}
# taxonomy subroutines
@@ -5587,17 +5589,17 @@ C<--print-arch> is a synonym.
=head2 search [I<options>] I<what>
-=head2 search [I<options>] --file I<what>
+=head3 search [I<options>] --file I<what>
-=head2 search [I<options>] --taxonomy I<what>
+=head3 search [I<options>] --taxonomy I<what>
-=head2 search [I<options>] --keyword I<what>
+=head3 search [I<options>] --keyword I<what>
-=head2 search [I<options>] --functionality I<what>
+=head3 search [I<options>] --functionality I<what>
-=head2 search [I<options>] --characterization I<what>
+=head3 search [I<options>] --characterization I<what>
-=head2 search [I<options>] --all I<what>
+=head3 search [I<options>] --all I<what>
By default, search the names, short descriptions, and long descriptions
of all locally installed packages for the argument I<what>, interpreted
@@ -5749,11 +5751,13 @@ checking the TL development repository.
=head2 path [--w32mode=user|admin] [add|remove]
-On Unix adds or removes symlinks for binaries, man pages, and info pages
-in the directories specified by the respective options (see above).
+On Unix, merely adds or removes symlinks for binaries, man pages, and
+info pages in the system directories specified by the respective options
+(see the L<option> description above). Does not change any
+initialization files, either system or personal.
-On Windows, the registry part where the binary directory is
-added or removed is determined in the following way:
+On Windows, the registry part where the binary directory is added or
+removed is determined in the following way:
If the user has admin rights, and the option C<--w32mode> is not given,
the setting I<w32_multi_user> determines the location (i.e., if it is
@@ -5772,6 +5776,7 @@ is given, it must be B<user> and the user path will be adjusted. If a
user without admin rights uses the option C<--w32mode admin> a warning
is issued that the caller does not have enough provileges.
+
=cut
# keep the following on *ONE* line otherwise Windows perldoc does
@@ -6037,6 +6042,7 @@ addition to these three on the top right there is some text showing the
currently loaded repository (this text also acts as button and will load
the default repository).
+
=head2 Menu bar
The following entries can be found in the menu bar:
@@ -6079,6 +6085,7 @@ installed version, authors, license.
=back
+
=head2 Main display
The main display lists all packages, installed and, if a repository is