aboutsummaryrefslogtreecommitdiffhomepage
path: root/org/sisu.org
blob: 6e9f396e07e1e26eb62cf37a22ac3c2395d83a8a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
-*- mode: org -*-
#+TITLE:       sisu
#+DESCRIPTION: documents - structuring, various output representations & search
#+FILETAGS:    :sisu:
#+AUTHOR:      Ralph Amissah
#+EMAIL:       [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]]
#+COPYRIGHT:   Copyright (C) 2015 - 2021 Ralph Amissah
#+LANGUAGE:    en
#+STARTUP:     content hideblocks hidestars noindent entitiespretty
#+OPTIONS:     H:3 num:nil toc:t \n:nil @:t ::t |:t ^:nil _:nil -:t f:t *:t <:t
#+PROPERTY:    header-args  :exports code
#+PROPERTY:    header-args+ :noweb yes
#+PROPERTY:    header-args+ :eval no
#+PROPERTY:    header-args+ :results no
#+PROPERTY:    header-args+ :cache no
#+PROPERTY:    header-args+ :padline no
#+PROPERTY:    header-args+ :mkdirp yes

[[./sisu_info.org][sisu_info.org]]  [[./][org/]]
[[./sisu_build.org][make/build]] VERSION

* version.txt (set version) :version:
** set program tangle

#+BEGIN_SRC txt  :NO-tangle "../views/version.txt"
<<sisu_version_current_set>>
#+END_SRC

* sisu.rb

#+HEADER: :tangle "../lib/sisu.rb"
#+BEGIN_SRC ruby
#<<sisu_document_header>>
module SiSU_libs
  require_relative 'sisu/hub'                               # sisu/hub.rb
  require_relative 'sisu/se'                                # sisu/se.rb
  require_relative 'sisu/utils'                             # sisu/utils.rb
  class CallHubMaster
    def initialize(argv,sisu_runtime)
      begin
        SiSU::HubMaster.new(argv,sisu_runtime)
      rescue
        SiSU_Screen::Ansi.new(argv).rescue do
          __LINE__.to_s + ':' + __FILE__
        end
      ensure
        Dir.chdir(sisu_runtime[:call_path])
      end
    end
  end
  class HubClose
    def initialize(argv,call_path)
      begin
        env=SiSU_Env::InfoEnv.new
      rescue
      ensure
        if FileTest.directory?(env.processing_path.processing) \
        and FileTest.directory?(env.processing_path.processing_base_tmp) \
        and env.processing_path.processing_base_tmp =~/#{env.processing_path.processing}/ \
        and env.processing_path.processing_base_tmp =~/^\/tmp\/\S+/ \
        and not argv.inspect =~/"--maintenance"|"-M"/
          FileUtils::cd(env.processing_path.processing_base_tmp) do
            FileUtils::rm_rf('.')
          end
        end
        Dir.chdir(call_path)
      end
    end
  end
end
__END__
#+END_SRC

* document header

#+NAME: sisu_document_header
#+BEGIN_SRC emacs-lisp
<<./sisu_version_info_and_doc_header_including_copyright_and_license.org:sisu_doc_header_including_copyright_and_license()>>
#+END_SRC