[tex-live] p4 is right, Sebastian is wrong :-)
Vladimir Volovich
vvv@vsu.ru
Fri, 19 Apr 2002 19:26:47 +0400
Hi,
Sebastian wrote:
VV> diff -r alpha-linux alphaev5-osf4.0d | grep -v Binary
VV>
VV> i will not put here it's 100K output... ;-)
VV>
SR> mine says
SR>
SR> [spqr]/texlive/Master/bin:diff -r alpha-linux alphaev5-osf4.0d | grep -v Binary
SR> Only in alphaev5-osf4.0d: mktexfmt
SR> [spqr]/texlive/Master/bin:
OK, here is a command which proves what subject says.
It compares two files in the sun.dante.de perforce repository directly.
So if you were running the above diff in a synced directory, you could
not have received the result above (i.e. no diffs).
$ P4PORT=sun.dante.de:1666 p4 diff2 -u //depot/Master/bin/alpha-linux/texshow //depot/Master/bin/alphaev5-osf4.0d/texshow
--- //depot/Master/bin/alpha-linux/texshow 2002/04/18 17:09:09
+++ //depot/Master/bin/alphaev5-osf4.0d/texshow 2002/04/17 22:49:14
@@ -1,22 +1,88 @@
-#!/bin/sh
+#!/usr/bin/env perl
+#D \module
+#D [ file=texshow.pl,
+#D version=1999.03.30,
+#D title=\TEXSHOW,
+#D subtitle=showing \CONTEXT\ commands,
+#D author=Hans Hagen,
+#D date=\currentdate,
+#D copyright={PRAGMA / Hans Hagen \& Ton Otten},
+#D suggestions={Tobias Burnus \& Taco Hoekwater}]
+#C
+#C This module is part of the \CONTEXT\ macro||package and is
+#C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+#C details.
+
+#D We need to find the module path. We could have used:
+#D
+#D \starttypen
+#D use FindBin ;
+#D use lib $FindBin::Bin ;
+#D \stoptypen
+#D
+#D But because we're sort of depending on \WEBC\ anyway, the
+#D next few lines are more appropriate:
+
+BEGIN
+ { $cont_pm_path = `kpsewhich --format='other text files' --progname=context cont_mis.pm` ;
+ $cont_pm_path =~ s/cont_mis\.pm.*// ;
+ chop $cont_pm_path }
+
+use lib $cont_pm_path ;
+
+#D Now we can load some modules:
+
+use Getopt::Long ;
+
+$Getopt::Long::passthrough = 1 ; # no error message
+$Getopt::Long::autoabbrev = 1 ; # partial switch accepted
+
+&GetOptions
+ ( "help" => \$ShowHelp ,
+ "interface" => \$Interface ) ;
+
+cont_mis::banner ('TeXShow 0.1 - ConTeXt', 'PRAGMA ADE 1999') ;
+
+if ($ShowHelp)
+ { cont_mis::help ('--help', "print this help") ;
+ cont_mis::help ('--interface', "primary interface") ;
+ cont_mis::help ('string', "show info about command 'string'") ;
+ cont_mis::help ('string lg', "show info about 'string' in language 'lg'") ;
+ cont_mis::crlf () ;
+ exit 0 }
-test -f /bin/sh5 && test -z "$RUNNING_SH5" \
- && { UNAMES=`uname -s`; test "x$UNAMES" = xULTRIX; } 2>/dev/null \
- && { RUNNING_SH5=true; export RUNNING_SH5; exec /bin/sh5 $0 ${1+"$@"}; }
-unset RUNNING_SH5
+use cont_mis ;
+use cont_set ;
-test -f /bin/bsh && test -z "$RUNNING_BSH" \
- && { UNAMES=`uname -s`; test "x$UNAMES" = xAIX; } 2>/dev/null \
- && { RUNNING_BSH=true; export RUNNING_BSH; exec /bin/bsh $0 ${1+"$@"}; }
-unset RUNNING_BSH
+use Tk ;
-# hack around a bug in zsh:
-test -n "${ZSH_VERSION+set}" && alias -g '${1+"$@"}'='"$@"'
+#D This scripts is rather simple, because most of the action
+#D takes place in the module \type {cont_set.pm}.
-what=`echo $0 | sed 's@.*/@@'`
+cont_mis::status ('searching for setup files') ;
-p=`kpsewhich -progname=context -format='other text files' $what.pl`
-{ test -n "$p" && test -f "$p"; } \
- || { echo "\`$what.pl' not found."; exit 1; }
+if (cont_set::setups_found)
+ { cont_mis::status ('loading setups') ;
+ cont_set::load_setups ;
+ cont_mis::status ('preparing display') ;
+ cont_set::show_setups ;
+ $command = $ARGV[0] ;
+ $interface = $ARGV[1] ;
+ if ($interface)
+ { $Interface = $interface }
+ if ($Interface)
+ { cont_set::set_setup_interface($Interface) ;
+ cont_mis::message ('primary interface', $Interface) }
+ if ($command)
+ { cont_mis::message ('searching command', $command) ;
+ cont_set::show_setup ($command) }
+ else
+ { cont_mis::warning ('no command specified') ;
+ cont_set::set_setup_title('TeXShow : ConTeXt commands') }
+ cont_mis::status ('entering main loop') ;
+ MainLoop () }
+else
+ { cont_mis::error ('no setup files found') }
-perl "$p" ${1+"$@"}
+END { cont_mis::crlf ;
+ cont_mis::status ('closing down') }
Best,
v.