diff options
-rw-r--r-- | data/doc/sisu/CHANGELOG_v3 | 2 | ||||
-rw-r--r-- | lib/sisu/v3/shared_sisupod_source.rb | 43 |
2 files changed, 23 insertions, 22 deletions
diff --git a/data/doc/sisu/CHANGELOG_v3 b/data/doc/sisu/CHANGELOG_v3 index 03061b08..31b031e0 100644 --- a/data/doc/sisu/CHANGELOG_v3 +++ b/data/doc/sisu/CHANGELOG_v3 @@ -43,6 +43,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_3.3.3.orig.tar.xz * v3: some pre-unicode meddling sorted (covers bug reported as middle dot changed to asterisk by chals) +* v3: sisupod source, paths fix + %% 3.3.2.orig.tar.xz (2012-06-30:26/6) http://git.sisudoc.org/?p=code/sisu.git;a=log;h=refs/tags/sisu_3.3.2 http://git.sisudoc.org/?p=code/sisu.git;a=log;h=refs/tags/debian/sisu_3.3.2-1 diff --git a/lib/sisu/v3/shared_sisupod_source.rb b/lib/sisu/v3/shared_sisupod_source.rb index 2aff984c..18821e37 100644 --- a/lib/sisu/v3/shared_sisupod_source.rb +++ b/lib/sisu/v3/shared_sisupod_source.rb @@ -86,7 +86,6 @@ module SiSU_Source image: path_pod + '/' + Gt[:image], audio: path_pod + '/' + Gt[:audio], video: path_pod + '/' + Gt[:video], - conf: path_pod + '/' + Gt[:conf] } end def read @@ -107,7 +106,7 @@ module SiSU_Source load "#{SiSU_lib}/defaults.rb" @skin={} skin_path = [ - "#{@env.path.pwd}/_sisu/skin", + "#{@opt.base_path}/_sisu/skin", "#{@env.path.home}/.sisu/skin", '/etc/sisu/skin', "#{@path_pod[:pod]}/external_document/skin" #CHECK @@ -214,7 +213,7 @@ module SiSU_Source FileUtils::mkdir_p(@path_pod[:image]) #unattractive hard coding ... ! image_path='_sisu/image' - images_pwd="#{@env.path.pwd}/#{image_path}" + images_pwd="#{@opt.base_path}/#{image_path}" ##sequence copies base images, defaults used in all html outputs #image_source_base='/usr/share/sisu/image' #dir_pwd=Dir.pwd @@ -238,9 +237,9 @@ module SiSU_Source if doc_import.length > 0 \ and @opt.fno =~/\.ssm$/ doc_import.each do |f| - if FileTest.file?("#{@env.path.pwd}#{doc_import_dir}/#{f}") - FileUtils::cp("#{@env.path.pwd}#{doc_import_dir}/#{f}","#{@path_pod[:doc]}/#{f}") - else STDERR.puts %{\t*WARN* did not find image - "#{@env.path.pwd}#{doc_import_dir}/#{f}" [#{__FILE__}:#{__LINE__}]} + if FileTest.file?("#{@opt.base_path}#{doc_import_dir}/#{f}") + FileUtils::cp("#{@opt.base_path}#{doc_import_dir}/#{f}","#{@path_pod[:doc]}/#{f}") + else STDERR.puts %{\t*WARN* did not find image - "#{@opt.base_path}#{doc_import_dir}/#{f}" [#{__FILE__}:#{__LINE__}]} end end end @@ -253,57 +252,57 @@ module SiSU_Source lng_f=$1 if @opt.lng == lng_f if @opt.fno =~/\.ssm$/ - if FileTest.file?("#{@env.path.pwd}#{doc_import_dir}/#{f[:f]}") - FileUtils::cp("#{@env.path.pwd}#{doc_import_dir}/#{f[:f]}", + if FileTest.file?("#{@opt.base_path}#{doc_import_dir}/#{f[:f]}") + FileUtils::cp("#{@opt.base_path}#{doc_import_dir}/#{f[:f]}", "#{@path_pod[:doc]}/#{f[:n]}") - else STDERR.puts %{\t*WARN* did not find - "#{@env.path.pwd}#{doc_import_dir}/#{f[:f]}" [#{__FILE__}:#{__LINE__}]} + else STDERR.puts %{\t*WARN* did not find - "#{@opt.base_path}#{doc_import_dir}/#{f[:f]}" [#{__FILE__}:#{__LINE__}]} end else - if FileTest.file?("#{@env.path.pwd}/#{f[:f]}") + if FileTest.file?("#{@opt.base_path}/#{f[:f]}") cpy= :no cpy=if f[:f] =~ /^#{@opt.f_pth[:lng_is]}\// \ or f[:f] =~ /~#{@opt.f_pth[:lng_is]}\.sst/ - p "#{@env.path.pwd}/#{f[:f]} --> #{@path_pod[:doc]}/#{f[:n]}" + p "#{@opt.base_path}/#{f[:f]} --> #{@path_pod[:doc]}/#{f[:n]}" :yes elsif f[:f] !~ /^(?:#{Px[:lng_lst_rgx]})\/|~(?:#{Px[:lng_lst_rgx]})\.sst/ \ and @opt.f_pth[:lng_is] == 'en' - p "#{@env.path.pwd}/#{f[:f]} --> #{@path_pod[:doc]}/#{f[:n]}" + p "#{@opt.base_path}/#{f[:f]} --> #{@path_pod[:doc]}/#{f[:n]}" :yes else :no end if cpy == :yes - FileUtils::cp("#{@env.path.pwd}/#{f[:f]}", + FileUtils::cp("#{@opt.base_path}/#{f[:f]}", "#{@path_pod[:doc]}/#{f[:n]}") end - else STDERR.puts %{\t*WARN* did not find - "#{@env.path.pwd}/#{f[:f]}" [#{__FILE__}:#{__LINE__}]} + else STDERR.puts %{\t*WARN* did not find - "#{@opt.base_path}/#{f[:f]}" [#{__FILE__}:#{__LINE__}]} end end end else if @opt.fno =~/\.ssm$/ - if FileTest.file?("#{@env.path.pwd}#{doc_import_dir}/#{f[:f]}") - FileUtils::cp_r("#{@env.path.pwd}#{doc_import_dir}/#{f[:f]}", + if FileTest.file?("#{@opt.base_path}#{doc_import_dir}/#{f[:f]}") + FileUtils::cp_r("#{@opt.base_path}#{doc_import_dir}/#{f[:f]}", "#{@path_pod[:doc]}/#{f[:n]}") - else STDERR.puts %{\t*WARN* did not find - "#{@env.path.pwd}#{doc_import_dir}/#{f[:f]}" [#{__FILE__}:#{__LINE__}]} + else STDERR.puts %{\t*WARN* did not find - "#{@opt.base_path}#{doc_import_dir}/#{f[:f]}" [#{__FILE__}:#{__LINE__}]} end else - if FileTest.file?("#{@env.path.pwd}/#{f[:f]}") + if FileTest.file?("#{@opt.base_path}/#{f[:f]}") cpy= :no cpy=if f[:f] =~ /^#{@opt.f_pth[:lng_is]}\// \ or f[:f] =~ /~#{@opt.f_pth[:lng_is]}\.sst/ - p "#{@env.path.pwd}/#{f[:f]} --> #{@path_pod[:doc]}/#{f[:n]}" + p "#{@opt.base_path}/#{f[:f]} --> #{@path_pod[:doc]}/#{f[:n]}" :yes elsif f[:f] !~ /^(?:#{Px[:lng_lst_rgx]})\/|~(?:#{Px[:lng_lst_rgx]})\.sst/ \ and @opt.f_pth[:lng_is] == 'en' - p "#{@env.path.pwd}/#{f[:f]} --> #{@path_pod[:doc]}/#{f[:n]}" + p "#{@opt.base_path}/#{f[:f]} --> #{@path_pod[:doc]}/#{f[:n]}" :yes else :no end if cpy == :yes - FileUtils::cp("#{@env.path.pwd}/#{f[:f]}", + FileUtils::cp("#{@opt.base_path}/#{f[:f]}", "#{@path_pod[:doc]}/#{f[:n]}") end - else STDERR.puts %{\t*WARN* did not find - "#{@env.path.pwd}/#{f[:f]}" [#{__FILE__}:#{__LINE__}]} + else STDERR.puts %{\t*WARN* did not find - "#{@opt.base_path}/#{f[:f]}" [#{__FILE__}:#{__LINE__}]} end end end |