Template directories are Makefile-configured.
parent
0c3a61f58d
commit
f40dbccc1f
|
@ -5,6 +5,8 @@ RC_DIRECTORY = "@SYSCONFDIR@/rc/services"
|
|||
LOG_DIRECTORY = "@VARSTATEDIR@/log"
|
||||
SERVICES_DIRECTORY = "@SHAREDIR@/services"
|
||||
ENVIRONMENTS_DIRECTORY = "@SYSCONFDIR@/rc/environments"
|
||||
SYSTEM_CONFIGURATION_DIRECTORY = "@SYSCONFDIR@"
|
||||
SHARED_DATA_DIRECTORY = "@SHAREDIR@"
|
||||
OWN_LIBEXEC_DIR = "@LIBEXECDIR@/service"
|
||||
CACHE_DIRECTORY = "@VARSTATEDIR@/cache"
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
require "crinja"
|
||||
|
||||
require "./config.cr"
|
||||
|
||||
def sanitize_path(path)
|
||||
path.gsub /\/\/+/, "/"
|
||||
end
|
||||
|
@ -41,11 +43,9 @@ class Configure::Context
|
|||
def generate(template, target : String, options : Hash(String, String | Array(String) | Crinja::Callable::Instance | Hash(String, String)))
|
||||
target_file = File.open target, "w"
|
||||
|
||||
# FIXME: Alter default sources at build-time.
|
||||
# FIXME: We’ll want a way to alter those context-wide.
|
||||
sources = [
|
||||
"/etc/templates",
|
||||
"/usr/share/templates"
|
||||
"#{SYSTEM_CONFIGURATION_DIRECTORY}/templates",
|
||||
"#{SHARED_DATA_DIRECTORY}/templates"
|
||||
]
|
||||
|
||||
sources = sources
|
||||
|
|
Loading…
Reference in New Issue