ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [PATCH] Small improvement for 'setuptex'
@ 2011-09-22 13:46 Vladimir Lomov
  2011-09-23  7:38 ` Mojca Miklavec
  0 siblings, 1 reply; 3+ messages in thread
From: Vladimir Lomov @ 2011-09-22 13:46 UTC (permalink / raw)
  To: General mailing list for ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 440 bytes --]

Hello.

I'm using standard 'setuptex' file to set apropriate variables for my
shell. I'd like to suggest small improvement for this file. See
attached patch.

P.S. The real use of this file is in my shell initialization scripts.
It is sourced in specific way so I faced a situation when 'export' is
required. Besides that unsetting unused variables also good habit to
interactive session.

---
WBR, Vladimir Lomov

-- 
Violence is molding.

[-- Attachment #2: setuptex.patch --]
[-- Type: text/plain, Size: 609 bytes --]

--- setuptex.orig	2011-09-22 22:36:37.000000000 +0900
+++ setuptex	2011-09-22 22:38:12.000000000 +0900
@@ -148,13 +148,16 @@
 	fi
 
 # ConTeXt binaries have to be added to PATH
-TEXMFOS=$TEXROOT/texmf-$platform
-PATH=$TEXMFOS/bin:$PATH
+export TEXMFOS=$TEXROOT/texmf-$platform
+export PATH=$TEXMFOS/bin:$PATH
 # TODO: we could set OSFONTDIR on Mac for example
 
 # not sure why this would be needed
 # export CTXMINIMAL=yes
 
+# unset variables that won't be used lately
+unset platform cpu system OWNPATH SCRIPTPATH ARGPATH
+
 else
 	echo "provide a proper tex root (like '. setuptex /something/tex')" ;
 fi

[-- Attachment #3: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-09-23 12:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-22 13:46 [PATCH] Small improvement for 'setuptex' Vladimir Lomov
2011-09-23  7:38 ` Mojca Miklavec
2011-09-23 12:37   ` Vladimir Lomov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).