Project

General

Profile

Download (2.48 KB) Statistics
| Branch: | Tag: | Revision:

root / post-config.rb @ 44648f83

1
# post-config.rb - setup config generation
2

    
3
#--
4
# CyborgHood, a distributed system management software.
5
# Copyright (c) 2009 Marc Dequènes (Duck) <Duck@DuckCorp.org>
6
#
7
# This program is free software: you can redistribute it and/or modify
8
# it under the terms of the GNU General Public License as published by
9
# the Free Software Foundation, either version 3 of the License, or
10
# (at your option) any later version.
11
#
12
# This program is distributed in the hope that it will be useful,
13
# but WITHOUT ANY WARRANTY; without even the implied warranty of
14
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
# GNU General Public License for more details.
16
#
17
# You should have received a copy of the GNU General Public License
18
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
19
#++
20

    
21
# General header.
22
header = <<HEADER
23
# config_setup.rb - Coin-diff setup configuration
24

    
25
#--
26
# CyborgHood, a distributed system management software.
27
# Copyright (c) 2009 Marc Dequènes (Duck) <Duck@DuckCorp.org>
28
#
29
# This program is free software: you can redistribute it and/or modify
30
# it under the terms of the GNU General Public License as published by
31
# the Free Software Foundation, either version 3 of the License, or
32
# (at your option) any later version.
33
#
34
# This program is distributed in the hope that it will be useful,
35
# but WITHOUT ANY WARRANTY; without even the implied warranty of
36
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
37
# GNU General Public License for more details.
38
#
39
# You should have received a copy of the GNU General Public License
40
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
41
#++
42

    
43
# This file is automatically generated by the installer.
44
# Do not edit by hand.
45

    
46
HEADER
47

    
48
# Generate config_setup.rb containing general compile/setup time configuration
49
# information (in the CoinDiff::Config module).
50
File.open('lib/cyborghood/config_setup.rb', 'w') do |file|
51

    
52
  file.print header
53
  file.print <<-CONFIG
54
module CyborgHood
55
  class Config
56
    BIN_DIR   = '#{config('bindir')}'
57
    CFG_DIR   = '#{File.join(config('sysconfdir'), 'cyborghood')}'
58
    DATA_DIR  = '#{File.join(config('datadir'), 'cyborghood')}'
59
    LIB_DIR   = '#{config('rbdir')}'
60
    LOG_DIR   = '#{File.join(config('localstatedir'), 'log', 'cyborghood')}'
61
    RUN_DIR   = '#{File.join(config('localstatedir'), 'run', 'cyborghood')}'
62
    VAR_DIR   = '#{File.join(config('localstatedir'), 'lib', 'cyborghood')}'
63
    L10N_DIR  = '#{File.join(config('datadir'), 'locale')}'
64
  end
65
end
66
  CONFIG
67

    
68
end # File.open
(7-7/9)