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


Ignore:
Timestamp:
Nov 16, 2012, 9:07:07 PM (11 years ago)
Author:
Bruno Cornec
Message:
  • Start working on plugins
File:
1 edited

Legend:

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

    r1667 r1679  
    281281    die "ERROR: Only able to handle files or dirs with option --source\n" if ((! -d $fullsource) && (! -f $fullsource));
    282282
    283     # We should get uid/gid fro elsewhere as they're probably wrong locally
     283    # We should get uid/gid from elsewhere as they're probably wrong locally
    284284    $cbp->{"cb.source"}->{$type}->{$source}->{'uid'} = $uid;
    285285    $cbp->{"cb.source"}->{$type}->{$source}->{'gid'} = $gid;
     
    294294    $findtarget = "$dest/$machine";
    295295    find(\&cb_add_to_cbp,($findtarget));
     296    # And we also need all what is common, but not what is for the web side
     297    foreach my $c (keys $cb->{'commondir'}) {
     298        $findtarget = "$dest/$c";
     299        opendir(DIR,"$findtarget") || die "Unable to open $dest/$c: $!";
     300        foreach my $m (readdir(DIR)) {
     301            next if ($m =~ /^\./);
     302            next if ($m eq $cb->{'commondir'}->{$c});
     303            find(\&cb_add_to_cbp,("$findtarget/$m"));
     304        }
     305        closedir(DIR);
     306    }
    296307}
    297308pb_log(1,"INFO: RAW cbp: ".Dumper(%$cbp)."\n");
     
    415426            if ((defined $force) || (not defined $cbp->{$k}->{$type}->{$o}->{'deleted'})) {
    416427                if ($debug) {
    417                     pb_log(1,"INFO: Executing (on $machine) sudo chown $cbp->{$k}->{$type}->{$o}->{'uid'}:$cbp->{$k}->{$type}->{$o}->{'gid'} $path/$o\n");
     428                    #pb_log(1,"INFO: Executing (on $machine) sudo chown $cbp->{$k}->{$type}->{$o}->{'uid'}:$cbp->{$k}->{$type}->{$o}->{'gid'} $path/$o\n");
    418429                    #pb_log(1,"INFO: Executing (on $machine) sudo chmod $cbp->{$k}->{$type}->{$o}->{'mode'} $path/$o\n");
    419430                } else {
    420431                    # TODO: remove hardcoded commands
    421                     print $chan "sudo chown $cbp->{$k}->{$type}->{$o}->{'uid'}:$cbp->{$k}->{$type}->{$o}->{'gid'} $path/$o\n";
     432                    #print $chan "sudo chown $cbp->{$k}->{$type}->{$o}->{'uid'}:$cbp->{$k}->{$type}->{$o}->{'gid'} $path/$o\n";
    422433                    # TODO: get a correct mode before setting it up
    423434                    #print $chan "sudo chmod $cbp->{$k}->{$type}->{$o}->{'mode'} $path/$o\n";
Note: See TracChangeset for help on using the changeset viewer.