diff options
Diffstat (limited to 'lib/sisu/v3/options.rb')
| -rw-r--r-- | lib/sisu/v3/options.rb | 21 | 
1 files changed, 15 insertions, 6 deletions
| diff --git a/lib/sisu/v3/options.rb b/lib/sisu/v3/options.rb index 77031ea4..ac31a896 100644 --- a/lib/sisu/v3/options.rb +++ b/lib/sisu/v3/options.rb @@ -62,9 +62,9 @@ module SiSU_commandline    require_relative 'sysenv'                             # sysenv.rb    @@base_path=nil    class Options -    attr_accessor :cmd,:mod,:act,:dir_structure_by,:f_pths,:files,:base_path,:base_stub,:paths,:lngs,:f_pth,:pth,:fns,:fnb,:fnc,:fncb,:lng,:lng_base,:what +    attr_accessor :cmd,:mod,:act,:dir_structure_by,:f_pths,:files,:base_path,:base_stub,:sub_location,:paths,:lngs,:f_pth,:pth,:fns,:fnb,:fnc,:fncb,:lng,:lng_base,:what      def initialize(a) -      @cmd,@f_pth,@pth,@fns,@fnb,@fnc,@fncb,@what,@lng,@lng_base,@base_path,@base_stub='','','','','','','','','','','','','' +      @cmd,@f_pth,@pth,@fns,@fnb,@fnc,@fncb,@what,@lng,@lng_base,@base_path,@base_stub,@sub_location='','','','','','','','','','','','',''        @f_pths,@files,@paths,@mod,@act=Array.new(5){[]}        @env=SiSU_Env::Info_env.new        @lng_base=@env.language_default_set @@ -197,12 +197,18 @@ module SiSU_commandline        a.uniq.each do |x|          if x =~/^-[a-z0-5]+/i \          or x =~/^--\S+/ -          if x =~/^-([a-z0-5]+)/i; c << $1 +          if x =~/^-([a-z0-5]+)/i +            c << $1            end -          if x =~/^--\S+/;        m << x +          if x =~/^--\S+/ +            m << x            end -        elsif x =~ /(?:\.(?:(?:-|ssm\.)?sst(?:\.xml)?|ssm|ssi|sx[sdn]\.xml|s[1-3]|kdi|ssp)|\S+?\.ss[mt]\.zip|sisupod(\.zip)?)$/ -          if x =~/^(?:https?|file):\/\/\S+/;  f << x +        elsif x =~ /(?:\.(?:(?:-|ssm\.)?sst(?:\.xml)?|ssm|ssi|sx[sdn]\.xml|s[1-3]|kdi|ssp)|\S+?\.ss[mt]\.txz|sisupod(\.txz)?)$/ +          if x =~/^(?:https?|file):\/\/\S+/ \ +          or x =~/\S+?\.ss[mt]\.txz|sisupod\.txz/ \ +          && FileTest.file?(x) +            x=x.gsub(/^file:\/\//,'') +            f << x            elsif FileTest.file?(x)  ### FIX              pt=Pathname.new(x) @@ -586,6 +592,9 @@ module SiSU_commandline      def pth        @pth      end +    def sub_location +      pth.gsub(/#{base_path}/,'') +    end      def lng        @lng      end | 
