class SiSU_Po4a_Project::Po4aDistClean
Public Class Methods
new(opt,file)
click to toggle source
# File lib/sisu/src_po4a_share.rb, line 259 def initialize(opt,file) @opt,@file=opt,file end
Public Instance Methods
song()
click to toggle source
# File lib/sisu/src_po4a_share.rb, line 262 def song pwd=Dir.pwd if FileTest.directory?(@file.output_path.po4a.dir) Dir.chdir(@file.output_path.po4a.dir) dirs=Dir['*/'] dirs_language=[] dirs.each do |x| dirs_language << x.gsub(/\/$/,'') end dirs_translation = \ (language.translation_languages_available & dirs_language) if dirs_translation.length > 0 puts %{remove language translation directorie(s): #{dirs_translation} in #{Dir .pwd}} ans=response?('disclean?') if ans FileUtils::rm_f(@file.base_filename.po4a_cfg) FileUtils::rm_r(dirs_translation,:force => true) #FileUtils::rm_r(language.translation_languages_available,:force => true) end end Dir.chdir(pwd) end end