initial commit of file from CVS for e-smith-ingo on Wed 12 Jul 08:57:44 BST 2023
This commit is contained in:
61
createlinks
Executable file
61
createlinks
Executable 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");
|
||||
}
|
Reference in New Issue
Block a user