aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v3/sysenv.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2011-08-18 23:21:23 -0400
committerRalph Amissah <ralph@amissah.com>2011-08-18 23:21:23 -0400
commita72ff8fbcebeb3a273ff1706501863daf065b1a5 (patch)
tree430c8d99401f74a9bddd55e281231da7b4b9b170 /lib/sisu/v3/sysenv.rb
parentdebian/changelog (3.0.15-1) (diff)
parentv3: dal, sisu document links (multiple output versions) shortcut (diff)
Merge commit 'sisu-3.0.16' into debian/sid
Diffstat (limited to 'lib/sisu/v3/sysenv.rb')
-rw-r--r--lib/sisu/v3/sysenv.rb18
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']