diff options
Diffstat (limited to 'lib/sisu/v2/sysenv.rb')
-rw-r--r-- | lib/sisu/v2/sysenv.rb | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/lib/sisu/v2/sysenv.rb b/lib/sisu/v2/sysenv.rb index c857468f..ed0fe136 100644 --- a/lib/sisu/v2/sysenv.rb +++ b/lib/sisu/v2/sysenv.rb @@ -115,6 +115,7 @@ module SiSU_Env end processing_path=tmp_processing_individual processing_dir=prcss_dir + processing_git="#{Dir.pwd}/#{Gt[:grotto]}" user=ENV['USER'] port_pgsql=if defined? ENV['PGPORT'] \ and not (ENV['PGPORT'].nil? \ @@ -149,6 +150,7 @@ module SiSU_Env PROCESSING_SQLITE=:processing_sqlite PROCESSING_POSTGRESQL=:processing_postgresql PROCESSING_ENCODING=:processing_encoding + PROCESSING_GIT=:processing_git PAPERSIZE=:papersize LANGUAGE=:language LANGUAGE_CODE=:language_code @@ -191,6 +193,7 @@ module SiSU_Env PROCESSING_SQLITE => 'sqlite', PROCESSING_POSTGRESQL=> 'postgresql', PROCESSING_ENCODING => 'encoding', + PROCESSING_GIT => processing_git, #TEXINFO_STUB => 'texinfo', PAPERSIZE => 'A4', #A4, US_letter, book_b5, book_a5, US_legal LANGUAGE => 'English', @@ -526,7 +529,7 @@ module SiSU_Env end def program_found?(program) found=`whereis #{program}` - state=(found =~/bin\/#{program}\b/) ? true : false + (found =~/bin\/#{program}\b/) ? true : false end def locale #locales utf8 or other unless @@locale_flag @@ -817,7 +820,7 @@ module SiSU_Env class Info_env < Env_call require 'fileutils' include FileUtils - attr_accessor :filename,:sys,:home,:hostname,:user,:env,:rc,:www,:fnb,:fnn,:fnt,:flv,:webserv_path,:stub_pwd,:stub_src,:webserv_host_cgi,:webserv_port_cgi,:processing,:etc,:yamlrc_dir + attr_accessor :filename,:sys,:home,:hostname,:user,:env,:rc,:www,:fnb,:fnn,:fnt,:flv,:webserv_path,:stub_pwd,:stub_src,:webserv_host_cgi,:webserv_port_cgi,:processing,:processing_git,:etc,:yamlrc_dir @@image_flag,@@local_image=true,true #warning on @@image_flag @@fb=@@man_path=nil,nil def initialize(fns='',md=nil) @@ -1449,6 +1452,23 @@ WOK end processing end + def processing_path_git + proposed_dir=if defined? @rc['git']['dir'] \ + and not @rc['git']['dir'].nil? \ + and not @rc['git']['dir'].empty? + x=(@rc['git']['dir'] =~/^(?:~|home)$/) \ + ? home + '/' + 'sisu:' \ + : @rc['git']['dir'] + '/' + 'sisu:' + else defaults[:processing_git] + end + end + def processing_git + unless FileTest.directory?(processing_path_git) + mkdir_p(processing_path_git) + File.chmod(0700,processing_path_git) + end + processing_path_git + end def epub "#{processing}/epub/#{@fnb}" end |