bin/br_bioflat.rb in bio-1.2.1 vs bin/br_bioflat.rb in bio-1.3.0

- old
+ new

@@ -39,10 +39,14 @@ You can use this option many times. Options only valid for --create (or --update) --type flat: --sort=/path/to/sort use external sort program (e.g. /usr/bin/sort) --sort=BUILTIN use builtin sort routine + (default: /usr/bin/sort or BUILTIN) + --env=/path/to/env use env program to run sort (default: /usr/bin/env) + --env-arg=XXXXXX argument given to the env program (default: LC_ALL=C) + (multiple --env-arg=XXXXXX can be specified) Options only valid for --update: --renew re-read all flatfiles and update whole index Backward compatibility: @@ -86,11 +90,11 @@ while args.first =~ /^\-/ case x = args.shift # OBDA stuff - when /^\-\-?format/ + when /^\-\-?format$/ args.shift format = nil # throw this f*ckin' mess for auto detect :) when /^\-\-?location/ location = args.shift.chomp('/') when /^\-\-?dbname/ @@ -117,9 +121,16 @@ when /^\-\-?sort\=(.*)/i options['sort_program'] = $1 options['onmemory'] = nil when /^\-\-?no\-?te?mp/i options['onmemory'] = true + + when /^\-\-?env\=(.*)/i + options['env_program'] = $1 + + when /^\-\-?env-arg(?:ument)?\=(.*)/i + options['env_program_arguments'] ||= [] + options['env_program_arguments'].push $1 when /^\-\-?primary.*\=(.*)/i options['primary_namespace'] = $1 when /^\-\-?add-secondary.*\=(.*)/i