From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/16365 Path: main.gmane.org!not-for-mail From: Hans Hagen Outside Newsgroups: gmane.comp.tex.context Subject: Re: Re: location of texsync.rb/minimal ConTeXt installation Date: Sat, 04 Sep 2004 19:26:18 +0200 Sender: ntg-context-bounces@ntg.nl Message-ID: <4139FABA.1030105@wxs.nl> References: <20040903185442.GD4578@puritan.pcp.ath.cx> <4139D598.9070204@wxs.nl> <20040904165703.GB4231@puritan.pcp.ath.cx> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------020009060700010604040408" X-Trace: sea.gmane.org 1094318800 9842 80.91.224.253 (4 Sep 2004 17:26:40 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 4 Sep 2004 17:26:40 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Sat Sep 04 19:26:31 2004 Return-path: Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1C3eJ4-0004Gn-00 for ; Sat, 04 Sep 2004 19:26:30 +0200 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 4DB5E1278D; Sat, 4 Sep 2004 19:26:30 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (ronja.vet.uu.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 26901-01; Sat, 4 Sep 2004 19:26:26 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 48AB012784; Sat, 4 Sep 2004 19:26:26 +0200 (CEST) Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 67BF912784 for ; Sat, 4 Sep 2004 19:26:25 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (ronja.vet.uu.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 26780-07 for ; Sat, 4 Sep 2004 19:26:24 +0200 (CEST) Original-Received: from mailrelay01.solcon.nl (unknown [212.45.32.200]) by ronja.ntg.nl (Postfix) with ESMTP id 8276A1276C for ; Sat, 4 Sep 2004 19:26:24 +0200 (CEST) Original-Received: from server-1.pragma-net.nl (dsl-212-84-128-085.solcon.nl [212.84.128.85]) by mailrelay01.solcon.nl (8.12.11/SQL-8.12.11-5/8.12.11) with ESMTP id i84HQJA3015115 for ; Sat, 4 Sep 2004 19:26:19 +0200 Original-Received: by server-1.pragma-net.nl (Postfix, from userid 65534) id B4C9018523; Sat, 4 Sep 2004 19:26:23 +0200 (CEST) Original-Received: from [127.0.0.1] (unknown [10.100.1.1]) by server-1.pragma-net.nl (Postfix) with ESMTP id E33BF17BA0 for ; Sat, 4 Sep 2004 17:26:20 +0000 (UTC) User-Agent: Mozilla Thunderbird 0.6 (Windows/20040502) X-Accept-Language: en-us, en Original-To: mailing list for ConTeXt users In-Reply-To: <20040904165703.GB4231@puritan.pcp.ath.cx> X-Virus-Scanned: clamd / ClamAV version 0.73, clamav-milter version 0.73a on mailrelay01.solcon.nl X-Virus-Status: Clean X-Virus-Scanned: by amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.5 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: by amavisd-new at ntg.nl Xref: main.gmane.org gmane.comp.tex.context:16365 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:16365 This is a multi-part message in MIME format. --------------020009060700010604040408 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Nikolai Weibull wrote: >In linuxtex.zip.bz2 you mean? (why the double compression?) > > the zip is not compressed, just use as storage container, bzipping the whole unzipped lot is more efficient >Then no. Neither is it in any of the cont-*.zip files; >nor in >http://www.pragma-ade.com/system/usr/local/context/tex/texmf-local/scripts/context/ruby/ > > hm, i'll have a look, file attached Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl ----------------------------------------------------------------- --------------020009060700010604040408 Content-Type: text/plain; name="texsync.rb" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="texsync.rb" #!/usr/bin/env ruby # program : texsync # copyright : PRAGMA Advanced Document Engineering # version : 1.1 - 2003/2004 # author : Hans Hagen # For the moment this script only handles the 'minimal' context # distribution. In due time I will add a few more options, like # synchronization of the iso image. banner = ['TeXSync', 'version 1.1', '2002/2004', 'PRAGMA ADE/POD'] unless defined? ownpath ownpath = $0.sub(/[\\\/]\w*?\.rb/i,'') $: << ownpath end require 'xmpl/switch' require 'exa/logger' require 'rbconfig' class Commands include CommandBase @@formats = ['en','nl','de','cz','it','ro'] @@always = ['metafun','mptopdf','en','nl'] @@rsync = 'rsync -r -z -c --progress --stats "--exclude=*.fmt" "--exclude=*.efmt" "--exclude=*.mem"' @@kpsewhich = Hash.new @@kpsewhich['minimal'] = 'SELFAUTOPARENT' @@kpsewhich['context'] = 'TEXMFLOCAL' @@kpsewhich['documentation'] = 'TEXMFLOCAL' @@kpsewhich['unknown'] = 'SELFAUTOPARENT' def update report return unless destination = getdestination texpaths = gettexpaths address = option('address') user = option('user') tree = option('tree') force = option('force') ok = true begin report("synchronizing '#{tree}' from '#{address}' to '#{destination}'") report if texpaths then texpaths.each do |path| report("synchronizing path '#{path}' of '#{tree}' from '#{address}' to '#{destination}'") command = "#{rsync} #{user}@#{address}::#{tree}/#{path} #{destination}/{path}" ok = ok && system(command) if force end else command = "#{@@rsync} #{user}@#{address}::#{tree} #{destination}" ok = system(command) if force end rescue report("error in running rsync") ok = false ensure if force then if ok then if option('make') then report("generating tex and metapost formats") report formats.delete_if do |f| begin `kpsewhich cont-#{f}`.chomp.empty? rescue end end str = [@@formats,@@always].flatten.uniq.join(' ') begin system("texexec --make --alone #{str}") rescue report("unable to generate formats '#{str}'") else report end else report("regenerate the formats files if needed") end else report("error in synchronizing '#{tree}'") end else report("provide --force to execute '#{command}'") unless force end end end def list report address = option('address') user = option('user') result = nil begin report("fetching list of trees from '#{address}'") command = "#{@@rsync} #{user}@#{address}::" if option('force') then result = `#{command}`.chomp else report("provide --force to execute '#{command}'") end rescue result = nil else if result then report("available trees:") report reportlines(result) end ensure report("unable to fetch list") unless result end end private def gettexpaths if option('full') then texpaths = ['texmf','texmf-local','texmf-fonts','texmf-mswin','texmf-linux','texmf-macos'] elsif option('terse') then texpaths = ['texmf','texmf-local','texmf-fonts'] case Config::CONFIG['host_os'] when /mswin/ then texpaths.push('texmf-mswin') when /linux/ then texpaths.push('texmf-linux') when /darwin/ then texpaths.push('texmf-macosx') end else texpaths = nil end texpaths end def getdestination if (destination = option('destination')) && ! destination.empty? then begin if @@kpsewhich.key?(destination) then destination = @@kpsewhich[option('tree')] || @@kpsewhich['unknown'] destination = `kpsewhich --expand-var=$#{destination}`.chomp elsif ! FileTest.directory?(destination) then destination = nil end rescue report("unable to determine destination tex root") else if ! destination || destination.empty? then report("no destination is specified") elsif not FileTest.directory?(destination) then report("invalid destination '#{destination}'") elsif not FileTest.writable?(destination) then report("destination '#{destination}' is not writable") else report("using destination '#{destination}'") return destination end end else report("unknown destination") end return nil end end logger = EXA::ExaLogger.new(banner.shift) commandline = CommandLine.new commandline.registeraction('update', 'update installed tree') commandline.registeraction('list', 'list available trees') commandline.registerflag('terse', 'download as less as possible (esp binaries)') commandline.registerflag('full', 'download everything (all binaries)') commandline.registerflag('force', 'confirm action') commandline.registerflag('make', 'remake formats') commandline.registervalue('address', 'www.pragma-ade.com', 'adress of repository (www.pragma-ade)') commandline.registervalue('user', 'guest', 'user account (guest)') commandline.registervalue('tree', 'tex', 'tree to synchronize (tex)') commandline.registervalue('destination', nil, 'destination of tree (kpsewhich)') commandline.registeraction('help') commandline.registeraction('version') commandline.expand Commands.new(commandline,logger,banner).send(commandline.action || 'help') --------------020009060700010604040408 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context --------------020009060700010604040408--