Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed Libraries/libUniversal/libcrypto.1.0.0.dylib
Binary file not shown.
Binary file added Libraries/libUniversal/libcrypto.1.1.dylib
Binary file not shown.
Binary file modified Libraries/libUniversal/libmysqlclient.21.dylib
Binary file not shown.
Binary file modified Libraries/libUniversal/libpq.5.dylib
Binary file not shown.
Binary file removed Libraries/libUniversal/libssl.1.0.0.dylib
Binary file not shown.
Binary file added Libraries/libUniversal/libssl.1.1.dylib
Binary file not shown.
Binary file added Libraries/libusb/libusb-1.0.0.dylib
Binary file not shown.
Binary file removed Libraries/libusb/libusb-1.0.a
Binary file not shown.
314 changes: 18 additions & 296 deletions Orca.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions Source/Objects/Hardware/SBC/SBC Link/SBC_Link.m
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ - (void) installDriver:(NSString*)rootPwd
passWord:passWord];
[driverScriptFileMover setVerbose:YES];
[driverScriptFileMover doNotMoveFilesToSentFolder];
[driverScriptFileMover setTransferType:eUseSCP];
[driverScriptFileMover setTransferType:eUseRSYNC];
[aSequence addTaskObj:driverScriptFileMover];

//since we made the task sequence the filemover's delegate,
Expand Down Expand Up @@ -1240,7 +1240,7 @@ - (void) reloadClient
passWord:passWord];
[SBCFileMover setVerbose:verbose];//TODO: was NO; for testing I would like to see this output; this takes the CB state from the GUI -tb-
[SBCFileMover doNotMoveFilesToSentFolder];
[SBCFileMover setTransferType:eUseSCP];
[SBCFileMover setTransferType:eUseRSYNC];
[aSequence addTaskObj:SBCFileMover];

//since we made the task sequence the filemover's delegate,
Expand Down
3 changes: 2 additions & 1 deletion Source/Objects/Misc Objects/FileCopy/ORFileMover.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ typedef enum _eFileTransferType {
eUseCURL = 0,
eUseSCP = 1,
eUseSFTP = 2,
eUseFTP = 3
eUseFTP = 3,
eUseRSYNC = 4
}eFileTransferType;

@interface ORFileMover : NSObject {
Expand Down
26 changes: 25 additions & 1 deletion Source/Objects/Misc Objects/FileCopy/ORFileMover.m
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,22 @@ -(void) doMove

case eUseCURL:
break;

case eUseRSYNC:
{
NSString* bp = [[NSBundle mainBundle ]resourcePath];
NSMutableString* theScript = [NSMutableString stringWithContentsOfFile:[bp stringByAppendingPathComponent:@"rsyncExpectScript"] encoding:NSASCIIStringEncoding error:nil];
[theScript replace:@"<isDir>" with:isDir?@"-r":@""];
[theScript replace:@"<verbose>" with:@""]; // High verbosity messes up the expect.
[theScript replace:@"<sourcePath>" with:[fullPath stringByReplacingOccurrencesOfString:@" " withString:@"\\ "]];
[theScript replace:@"<userName>" with:remoteUserName];
[theScript replace:@"<host>" with:remoteHost];
[theScript replace:@"<destinationPath>" with:tmpRemotePath];
[theScript replace:@"<password>" with:remotePassWord];
[theScript writeToFile:scriptPath atomically:YES encoding:NSASCIIStringEncoding error:nil];
}
break;

}

//make the script executable
Expand Down Expand Up @@ -422,6 +438,14 @@ - (void) taskCompleted: (NSNotification*)aNote
NSLog(@"task return status: %d\n",[task terminationStatus]);
}
break;

case eUseRSYNC:
if([task terminationStatus] == 0)transferOK = YES;
else {
transferOK = NO;
NSLog(@"task return status: %d\n",[task terminationStatus]);
}
break;
}
}

Expand Down Expand Up @@ -530,4 +554,4 @@ - (void) cleanSentFolder:(NSString*)dirPath
[nc postNotificationName:ORFileMoverIsDoneNotification object:self];
}

@end
@end
26 changes: 26 additions & 0 deletions Source/Objects/Misc Objects/FileCopy/rsyncExpectScript
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/usr/bin/expect --
# Use the "/usr/bin/expect -d --" to enable debuging output
#
set timeout -1
spawn rsync -av <verbose> <sourcePath>/ <userName>@<host>:<destinationPath>

expect {
"assword:" {
send "<password>\n"
exp_continue
}
"yes/no" {
send "yes\n"
exp_continue
}
"done" {
#send_user "starting file transfer\n"
}
timeout { send_user "\nrsync time out\n" }
eof
}
expect eof

# Wait for the result of the command; is the third element in the list
catch wait result
exit [lindex $result 3]