Changeset 1494 in ProjectBuilder for projects/casparbuster/devel/bin/cb


Ignore:
Timestamp:
Apr 30, 2012, 2:58:47 AM (12 years ago)
Author:
Bruno Cornec
Message:
  • Add support for cbplugindirsandfiles. This param provides support for direstories and all their children, whereas cbplugindirs is restricted to the directory alone. Usefull for named support
  • Add named plugin
  • cbusterize wworks now mostly for named (access to root owned file is still aproblem to solve)
  • cb also supports the new cbplugindirsandfiles param
File:
1 edited

Legend:

Unmodified
Added
Removed
  • projects/casparbuster/devel/bin/cb

    r1490 r1494  
    257257        $cbp = cb_plugin_get($p,$cbp);
    258258        # Adds mtime info to the plugin structure
    259         foreach my $type ('files','dirs') {
     259        foreach my $type ('files','dirs','dirsandfiles') {
    260260            foreach my $f (keys %{$cbp->{$p}->{$type}}) {
    261261                my $tdir = $dest;
     
    282282    my $type = 'files';
    283283    if (-d $fullsource) {
    284         $type = 'dirs';
     284        $type = 'dirsandfiles';
    285285    }
    286286    die "ERROR: Only able to handle files or dirs with option --source\n" if ((! -d $fullsource) && (! -f $fullsource));
     
    321321    # Check what in cbp is in the DB and deploy only if necessary
    322322    foreach my $k (keys %{$cbp}) {
    323         foreach my $type ('files','dirs') {
     323        foreach my $type ('files','dirs','dirsandfiles') {
    324324            foreach my $o (keys %{$cbp->{$k}->{$type}}) {
    325325                # Compare with info from DB
     
    353353my $curdate = time();
    354354foreach my $k (keys %{$cbp}) {
    355     foreach my $type ('files','dirs') {
     355    foreach my $type ('files','dirs','dirsandfiles') {
     356        # TODO: for dirs we may remove the files below ?
    356357        foreach my $o ((keys %{$cbp->{$k}->{$type}})) {
    357358            if (not defined $cbp->{$k}->{$type}->{$o}->{'deleted'}) {
     
    426427
    427428foreach my $k (keys %{$cbp}) {
    428     foreach my $type ('files','dirs') {
     429    foreach my $type ('files','dirs','dirsandfiles') {
     430        # TODO: do we act recursively for dirsandfiles at least for uid/gid ?
    429431        foreach my $o ((keys %{$cbp->{$k}->{$type}})) {
    430432            if (not defined $cbp->{$k}->{$type}->{$o}->{'deleted'}) {
     
    441443    if (defined $cbp->{$k}->{'reloadscript'}) {
    442444        if ($debug) {
    443             pb_log(1,"INFO: Executing (on $mac) sudo $cbp->{$k}->{'reloadscript'}\n");
     445            pb_log(1,"INFO: Executing (on $mac) $cbp->{$k}->{'reloadscript'}\n");
    444446        } else {
    445             &$func("sudo $cbp->{$k}->{'reloadscript'}");
     447            &$func("$cbp->{$k}->{'reloadscript'}");
    446448        }
    447449    }
Note: See TracChangeset for help on using the changeset viewer.