Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ptp-dev] Where to insert Modules commands for remote sync build

What about transferring a script over and then running it? You would used IRemoteFileManager#getResource to return an IFileStore to the script, then use the IFileStore methods (e.g. openOutputStream) to create the file. You could also then use other scripting languages (e.g. perl) if you wanted.

Greg

On Jan 12, 2012, at 4:30 PM, Jeffrey Overbey wrote:

This is mostly for Greg, I think.  We can move this discussion offline or to a Bugzilla bug if you prefer.

So far, I have Modules support prototyped for building remote synchronized projects.  In short, I adjusted the call to remoteServices.getProcessBuilder() in SyncCommandLauncher so that, instead of executing the obvious command (say, "make -f Makefile.mk"), it executes a horrifically long Bash invocation like bash -l -c for MODULE in `module -t list 2>&1 | grep -E -v ':$|^[ \t]*$'`; do module unload "$MODULE"; done; module load user_paths; module load os_paths; make -f Makefile.mk  (Modules commands are only available in login shells, thus bash -l; and the obvious module purge doesn't work on some machines, thus list/grep/unload.)

It would be a bit cleaner if all of this could be dumped into a script (IRemoteScript), but script construction seems to happen in RemoteToolsProcessBuilder and isn't easily accessible to the SyncCommandLauncher... and, it wouldn't be available under RSE anyway, from what I can tell.

So, is replacing the command sent to #getProcessBuilder with a Bash invocation the best way to handle this, or do you have a better idea?

Jeff _______________________________________________
ptp-dev mailing list
ptp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ptp-dev


Back to the top