initial commit of file from CVS for e-smith-ingo on Wed 12 Jul 08:57:44 BST 2023

This commit is contained in:
Brian Read
2023-07-12 08:57:44 +01:00
parent a4bbd1a04a
commit cd0a45b0f2
39 changed files with 1378 additions and 2 deletions

61
createlinks Executable file
View File

@@ -0,0 +1,61 @@
#!/usr/bin/perl -w
use File::Basename;
use File::Path;
use esmith::Build::CreateLinks qw(:all);
sub safe_touch
{
my ($path) = @_;
my ($file, $dir) = fileparse $path;
unless (-d $dir)
{
mkpath $dir or die "Could not create dir $dir: $!";
}
open(F, ">$path") or die "Could not open/create file $path: $!";
close(F) or die "Could not close file $path: $!";
}
# Prime the empty file tree that the generic template expansion
# action uses
sub templates2events
{
my ($path, @events) = @_;
foreach (@events)
{
safe_touch "root/etc/e-smith/events/$_/templates2expand/$path";
}
}
# conf-ingo
foreach (qw(conf.php backends.php prefs.php))
{
templates2events("/home/httpd/html/horde/ingo/config/$_",
qw(
bootstrap-console-save
email-update
));
}
foreach (qw(
78mysql.create.ingo
79ingo_upgrade
))
{
templates2events(
"/etc/e-smith/sql/init/$_",
qw(post-install post-upgrade));
}
foreach (qw(conf.php prefs.php backends.php))
{
safe_symlink("/etc/e-smith/templates-default/template-begin-php",
"root/etc/e-smith/templates/home/httpd/html/horde/ingo/config/$_/template-begin");
safe_symlink("/etc/e-smith/templates-default/template-end-php",
"root/etc/e-smith/templates/home/httpd/html/horde/ingo/config/$_/template-end");
}