Changeset 1679 in ProjectBuilder for projects/casparbuster/devel/bin
- Timestamp:
- Nov 16, 2012, 9:07:07 PM (12 years ago)
- Location:
- projects/casparbuster/devel/bin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
projects/casparbuster/devel/bin/cb
r1667 r1679 281 281 die "ERROR: Only able to handle files or dirs with option --source\n" if ((! -d $fullsource) && (! -f $fullsource)); 282 282 283 # We should get uid/gid fro elsewhere as they're probably wrong locally283 # We should get uid/gid from elsewhere as they're probably wrong locally 284 284 $cbp->{"cb.source"}->{$type}->{$source}->{'uid'} = $uid; 285 285 $cbp->{"cb.source"}->{$type}->{$source}->{'gid'} = $gid; … … 294 294 $findtarget = "$dest/$machine"; 295 295 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 } 296 307 } 297 308 pb_log(1,"INFO: RAW cbp: ".Dumper(%$cbp)."\n"); … … 415 426 if ((defined $force) || (not defined $cbp->{$k}->{$type}->{$o}->{'deleted'})) { 416 427 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"); 418 429 #pb_log(1,"INFO: Executing (on $machine) sudo chmod $cbp->{$k}->{$type}->{$o}->{'mode'} $path/$o\n"); 419 430 } else { 420 431 # 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"; 422 433 # TODO: get a correct mode before setting it up 423 434 #print $chan "sudo chmod $cbp->{$k}->{$type}->{$o}->{'mode'} $path/$o\n"; -
projects/casparbuster/devel/bin/cbusterize
r1668 r1679 215 215 pb_log(1, "DEBUG: remote account2 = $remote\n"); 216 216 217 $ssh2 = cb_ssh_init($remote,$machine,$debug) if (not defined $ssh2); 218 217 219 # Create basedir if it doesn't exist 218 220 if (not -d $basedir) { … … 236 238 foreach my $p (split(/,/,$plugin)) { 237 239 pb_log(1,"Getting context for plugin $p\n"); 238 $cbp = cb_plugin_get($p,$cbp );240 $cbp = cb_plugin_get($p,$cbp,$remote,$machine,$debug,$ssh2); 239 241 pb_log(2,"cbp: ".Dumper($cbp)."\n"); 240 242 foreach my $k (keys %{$cbp->{$plugin}->{'dirsandfiles'}}) { … … 260 262 my $realsrc = ""; 261 263 my $type = ""; 262 263 $ssh2 = cb_ssh_init($remote,$machine,$debug) if (not defined $ssh2);264 264 265 265 $chan = $ssh2->channel();
Note:
See TracChangeset
for help on using the changeset viewer.