Project

General

Profile

Download (2.47 KB) Statistics
| Branch: | Tag: | Revision:
# post-config.rb - setup config generation

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

# General header.
header = <<HEADER
# config.rb - Coin-diff setup configuration

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

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

HEADER

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

file.print header
file.print <<-CONFIG
module CyborgHood
class Config
BIN_DIR = '#{config('bindir')}'
CFG_DIR = '#{File.join(config('sysconfdir'), 'cyborghood')}'
DATA_DIR = '#{File.join(config('datadir'), 'cyborghood')}'
LIB_DIR = '#{config('rbdir')}'
LOG_DIR = '#{File.join(config('localstatedir'), 'log', 'cyborghood')}'
RUN_DIR = '#{File.join(config('localstatedir'), 'run', 'cyborghood')}'
VAR_DIR = '#{File.join(config('localstatedir'), 'lib', 'cyborghood')}'
L10N_DIR = '#{File.join(config('datadir'), 'locale')}'
end
end
CONFIG

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