I'm thinking the best solution might be to set up passwordless authentication via SSH and set the remote computer details in the script?
That's the way to go. You can run a command on a remote server like this:
ssh user@host.com 'echo "I'm on the server!!!" ' ___________________ Ben Jackson Diretor de Desenvolvimento
+55 (21) 2256-1022 ben@incomumdesign.com http://www.incomumdesign.com
On 8/15/06, Benjamin Jackson ben@incomumdesign.com wrote:
I'm thinking the best solution might be to set up passwordless authentication via SSH and set the remote computer details in the script?
That's the way to go. You can run a command on a remote server like this:
ssh user@host.com 'echo "I'm on the server!!!" '
Thank you all. I have passwordless authentication set up and I can now send a command via Textmate.
Next question: Is there a TM variable for the current open file? So, just like TM_FILEPATH, but with just the file name? I work remotely on the files in Textmate via Samba, so the filepath makes no sense on the remote machine via SSH when I pass a command. However, if I could get just the path/to/file from the work directory on the remote machine I could successfully check out a file from Clearcase from inside of Textmate. I'm not sure how one would go about removing part of the TM_FILEPATH.
Thanks for any assistance.
best, Charles
On 16/8/2006, at 22:24, Charles Stuart wrote:
Next question: Is there a TM variable for the current open file? So, just like TM_FILEPATH, but with just the file name?
There is TM_FILENAME.
[...] I'm not sure how one would go about removing part of the TM_FILEPATH.
Should a similar situation arise:
Using a shell command to do it:
"$(basename "$TM_FILEPATH")"
Using bash variable substitution:
"${TM_FILEPATH##*/}"
Thanks everyone. Here is the bundle command and remote script: Everything except the first two directories in $TM_FILEPATH are good, so we just cut out those (/Volumes/localhost).
_TM Bundle Command:
ssh remote_machine_address "bin/ctco_from_remote.sh $TM_FILEPATH"
_Script on Remote Machine:
#!/bin/sh
FILE="$1" FILE=${FILE#/Volumes/localhost}
#echo "$FILE" > ~/bin/ctco_from_remote.filename
ct checkout $FILE
On 8/16/06, Allan Odgaard throw-away-1@macromates.com wrote:
On 16/8/2006, at 22:24, Charles Stuart wrote:
Next question: Is there a TM variable for the current open file? So, just like TM_FILEPATH, but with just the file name?
There is TM_FILENAME.
[...] I'm not sure how one would go about removing part of the TM_FILEPATH.
Should a similar situation arise:
Using a shell command to do it:
"$(basename "$TM_FILEPATH")"
Using bash variable substitution:
"${TM_FILEPATH##*/}"