summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2007-01-18 12:57:00 +0100
committerHans Hagen <pragma@wxs.nl>2007-01-18 12:57:00 +0100
commitff1d9ea45aeb4b9a0bc12a40b38621b6d7e8eed0 (patch)
tree6e5212f3721c7363d8dcf2b05f16b3a7a3ba0b1a /scripts
parentef711d047d8d3e8d2cfb53e4c42b170365c06b84 (diff)
downloadcontext-ff1d9ea45aeb4b9a0bc12a40b38621b6d7e8eed0.tar.gz
stable 2007.01.18 12:57
Diffstat (limited to 'scripts')
-rw-r--r--scripts/context/ruby/base/ctx.rb9
-rw-r--r--scripts/context/ruby/base/tex.rb20
-rw-r--r--scripts/context/ruby/texmfstart.rb3
-rw-r--r--scripts/context/ruby/texsync.rb4
-rw-r--r--scripts/context/ruby/textools.rb3
5 files changed, 28 insertions, 11 deletions
diff --git a/scripts/context/ruby/base/ctx.rb b/scripts/context/ruby/base/ctx.rb
index f86e92d18..f33bf63a5 100644
--- a/scripts/context/ruby/base/ctx.rb
+++ b/scripts/context/ruby/base/ctx.rb
@@ -21,7 +21,7 @@ require 'rexml/document'
class CtxRunner
- attr_reader :environments, :modules, :filters, :flags
+ attr_reader :environments, :modules, :filters, :flags, :modes
@@suffix = 'prep'
@@ -43,6 +43,7 @@ class CtxRunner
@modules = Array.new
@filters = Array.new
@flags = Array.new
+ @modes = Array.new
@local = false
end
@@ -130,6 +131,9 @@ class CtxRunner
REXML::XPath.each(root,"/ctx:job//ctx:resources/ctx:filter") do |fil|
@filters << justtext(fil)
end
+ REXML::XPath.each(root,"/ctx:job//ctx:resources/ctx:mode") do |fil|
+ @modes << justtext(fil)
+ end
begin
REXML::XPath.each(root,"//ctx:block") do |blk|
if @jobname && blk.attributes['pattern'] then
@@ -155,6 +159,9 @@ class CtxRunner
REXML::XPath.each(root,"/ctx:job//ctx:process/ctx:resources/ctx:filter") do |fil|
@filters << justtext(fil)
end
+ REXML::XPath.each(root,"/ctx:job//ctx:process/ctx:resources/ctx:mode") do |fil|
+ @modes << justtext(fil)
+ end
REXML::XPath.each(root,"/ctx:job//ctx:process/ctx:flags/ctx:flag") do |flg|
@flags << justtext(flg)
end
diff --git a/scripts/context/ruby/base/tex.rb b/scripts/context/ruby/base/tex.rb
index ca73754f4..0969c3807 100644
--- a/scripts/context/ruby/base/tex.rb
+++ b/scripts/context/ruby/base/tex.rb
@@ -140,7 +140,7 @@ class TEX
['cont-fr','fr','french'] .each do |f| @@texformats[f] = 'cont-fr' end
['cont-cz','cz','czech'] .each do |f| @@texformats[f] = 'cont-cz' end
['cont-ro','ro','romanian'] .each do |f| @@texformats[f] = 'cont-ro' end
- ['cont-uk','uk','brittish'] .each do |f| @@texformats[f] = 'cont-uk' end
+ ['cont-uk','uk','british'] .each do |f| @@texformats[f] = 'cont-uk' end
['mptopdf'] .each do |f| @@texformats[f] = 'mptopdf' end
['latex'] .each do |f| @@texformats[f] = 'latex.ltx' end
@@ -168,9 +168,8 @@ class TEX
['cont-en','cont-nl','cont-de','cont-it',
'cont-fr','cont-cz','cont-ro','cont-uk'] .each do |f| @@texprocstr[f] = "\\emergencyend" end
- # @@runoptions['xetex'] = ['--output-driver \\\"-d 4 -V 5\\\"'] # we need the pos pass
- # @@runoptions['xetex'] = ['--8bit','-no-pdf'] # from now on we assume (x)dvipdfmx to be used
- @@runoptions['xetex'] = ['--8bit','-output-driver=\"xdvipdfmx -q -E -d 4 -V 5\"']
+ # @@runoptions['xetex'] = ['--8bit','-output-driver="xdvipdfmx -E -d 4 -V 5 -q"']
+ @@runoptions['xetex'] = ['--8bit','-output-driver="xdvipdfmx -E -d 4 -V 5"']
@@runoptions['pdfetex'] = ['--8bit'] # obsolete
@@runoptions['pdftex'] = ['--8bit'] # pdftex is now pdfetex
@@runoptions['luatex'] = ['--file-line-error']
@@ -1448,9 +1447,10 @@ class TEX
end
end
opt << "\\protect\n";
- begin getvariable('filters' ).split(',').uniq.each do |f| opt << "\\useXMLfilter[#{f}]\n" end ; rescue ; end
- begin getvariable('usemodules' ).split(',').uniq.each do |m| opt << "\\usemodule[#{m}]\n" end ; rescue ; end
- begin getvariable('environments').split(',').uniq.each do |e| opt << "\\environment #{e}\n" end ; rescue ; end
+ # begin getvariable('modes' ).split(',').uniq.each do |e| opt << "\\enablemode [#{e}]\n" end ; rescue ; end
+ begin getvariable('filters' ).split(',').uniq.each do |f| opt << "\\useXMLfilter[#{f}]\n" end ; rescue ; end
+ begin getvariable('usemodules' ).split(',').uniq.each do |m| opt << "\\usemodule [#{m}]\n" end ; rescue ; end
+ begin getvariable('environments').split(',').uniq.each do |e| opt << "\\environment #{e} \n" end ; rescue ; end
# this will become:
# begin getvariable('environments').split(',').uniq.each do |e| opt << "\\useenvironment[#{e}]\n" end ; rescue ; end
opt << "\\endinput\n"
@@ -1810,6 +1810,7 @@ class TEX
envs = ctx.environments
mods = ctx.modules
flags = ctx.flags
+ mdes = ctx.modes
flags.each do |f|
f.sub!(/^\-+/,'')
@@ -1826,16 +1827,21 @@ class TEX
envs << getvariable('environments') unless getvariable('environments').empty?
mods << getvariable('modules') unless getvariable('modules') .empty?
+ mdes << getvariable('modes') unless getvariable('modes') .empty?
envs = envs.uniq.join(',')
mods = mods.uniq.join(',')
+ mdes = mdes.uniq.join(',')
report("using search method '#{Kpse.searchmethod}'") if getvariable('verbose')
+
report("using environments #{envs}") if envs.length > 0
report("using modules #{mods}") if mods.length > 0
+ report("using modes #{mdes}") if mdes.length > 0
setvariable('environments', envs)
setvariable('modules', mods)
+ setvariable('modes', mdes)
end
# end of preprocessing and merging
diff --git a/scripts/context/ruby/texmfstart.rb b/scripts/context/ruby/texmfstart.rb
index 4d1e29761..17d4b5042 100644
--- a/scripts/context/ruby/texmfstart.rb
+++ b/scripts/context/ruby/texmfstart.rb
@@ -1920,6 +1920,7 @@ def usage
end
# somehow registration does not work out (at least not under windows)
+# the . is also not accepted by unix as seperator
def tag(name)
if $crossover then "_CTX_K_S_#{name}_" else "TEXMFSTART.#{name}" end
@@ -2576,5 +2577,3 @@ else
report("\nexecution failed") if $verbose
exit(1)
end
-
-# exit (if ($?.to_i rescue 0) > 0 then 1 else 0 end)
diff --git a/scripts/context/ruby/texsync.rb b/scripts/context/ruby/texsync.rb
index ade307d8e..004610399 100644
--- a/scripts/context/ruby/texsync.rb
+++ b/scripts/context/ruby/texsync.rb
@@ -14,6 +14,8 @@
# distribution. In due time I will add a few more options, like
# synchronization of the iso image.
+# taco's sync: rsync -au -v rsync://www.pragma-ade.com/all ./htdocs
+
banner = ['TeXSync', 'version 1.1.1', '2002/2004', 'PRAGMA ADE/POD']
$: << File.expand_path(File.dirname($0)) ; $: << File.join($:.last,'lib') ; $:.uniq!
@@ -28,7 +30,7 @@ class Commands
include CommandBase
- @@formats = ['en','nl','de','cz','it','ro']
+ @@formats = ['en','nl','de','cz','it','ro', 'fr']
@@always = ['metafun','mptopdf','en','nl']
@@rsync = 'rsync -r -z -c --progress --stats "--exclude=*.fmt" "--exclude=*.efmt" "--exclude=*.mem"'
diff --git a/scripts/context/ruby/textools.rb b/scripts/context/ruby/textools.rb
index b6300215e..56b018e2a 100644
--- a/scripts/context/ruby/textools.rb
+++ b/scripts/context/ruby/textools.rb
@@ -974,6 +974,8 @@ class Commands
donepaths.keys.sort.each do |d|
pathfiles = Dir.glob("#{path}/#{d}/**/*")
pathfiles.each do |p|
+# puts(File.dirname(p))
+# if donepaths[File.dirname(p)] then
r = File.join(root,d,File.basename(p))
if FileTest.file?(p) and not FileTest.file?(r) and not copiedfiles.key?(File.expand_path(p)) then
if delete then
@@ -988,6 +990,7 @@ class Commands
end
end
end
+# end
end
end