diff options
-rw-r--r-- | lib/sisu/v3/sysenv.rb | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/sisu/v3/sysenv.rb b/lib/sisu/v3/sysenv.rb index 80069f9d..f5d14583 100644 --- a/lib/sisu/v3/sysenv.rb +++ b/lib/sisu/v3/sysenv.rb @@ -690,16 +690,16 @@ module SiSU_Env program='createdb' db_name="#{Db[:name_prefix]}#{dbname_stub}" program_ref="\n\t\tcreatedb dbname #{db_name} #for postgresql database creation" - if program_found?(program); system("createdb #{dbname_name}") - else puts "\tWARN: #{program} is not available #{program_ref}" #if @cmd =~/v/ - end + (program_found?(program)) \ + ? system("#{program} #{dbname_name}") \ + : (puts "\tWARN: #{program} is not available #{program_ref}") end def relaxng(cmd='') #trang - convert between different schema languages for XML program='trang' program_ref="\n\t\tsee <http://www.thaiopensource.com/relaxng/trang.html>" - if program_found?(program); system("trang #{@input} #{@output}") - else puts "\tWARN: #{program} is not installed #{program_ref}" if cmd =~/V/ - end + (program_found?(program)) \ + ? system("#{program} #{@input} #{@output}") \ + : (puts "\tWARN: #{program} is not installed #{program_ref}" if cmd =~/V/) end def qrencode #qrcode - for generating QR code program='qrencode' @@ -729,9 +729,9 @@ module SiSU_Env def well_formed? #tidy - check for well formed xml xhtml etc. program=@prog.tidy program_ref="\n\t\tsee <http://tidy.sourceforge.net/>" - if program_found?(program); system("#{@prog.tidy} -xml #{@input} > #{@output}") - else puts "\tWARN: #{program} is not installed #{program_ref}" - end + (program_found?(program)) \ + ? system("#{@prog.tidy} -xml #{@input} > #{@output}") \ + : (puts "\tWARN: #{program} is not installed #{program_ref}") end def tex2pdf_engine prog=['xetex','xelatex','pdflatex','pdfetex','pdftex'] |