Here's another take on it. I created a new bundle called SCP and added the command below. It relies on 1) You having a project; and 2) Your having entered HOST_NAME, USER_ID, and ROOT_DIR in the project's environment variables. It also relies on shared-key access to the host so I don't have to send a password. Comments?
# ------------------------
#!/usr/bin/env ruby
class String
def -(other_string)
self.sub(other_string, '')
end
end
working_file = ENV['TM_FILEPATH'] - ENV['TM_PROJECT_DIRECTORY']
working_directory = working_file.gsub(/\/[^\/]*$/, '')
puts "Working File: #{working_file}"
puts "Working Directory: #{working_directory}"
scp_cmd = "scp #{ENV['TM_FILEPATH']} #{ENV['USER_ID']}@#{ENV['HOST_NAME']}:#{File.join(ENV['ROOT_DIR'], working_directory)}"
system scp_cmd
# ------------------------
On Feb 7, 2007, at 3:12 PM, Dave Grijalva wrote:
if it's a single file, you can simply open the file directly on the server using something like cyberduck or transmit.
for cyberduck in preferences under the general tab, choose textmate from the edior pulldown.
connect to your server.
find the file and click the edit icon (should be the textmate icon).
edit the file in textmate. when you save, it is automatically pushed back up.
-dave
On 2/7/07, s.ross <cwdinfo@gmail.com> wrote: Well, I'd rather use Capistrano, but it's a big hammer for a one-file
edit to a Smarty template (client says, "add 'now hiring' to the home
page) in a PHP project. Given the great integration with sftp
clients, I was kinda hoping this would be pretty easy.
On Feb 7, 2007, at 2:41 PM, Steve Lianoglou wrote:
>> So having something that intelligently deals with local to remote
>> paths is probably the tricky party here. You probably don't want
>> to type a remote path every time. This might be a good time to
>> try out MacFUSE and sshfs.
>
> .. or subversion/cvs ... :-)
>
> -steve
>
> ______________________________________________________________________
> For new threads USE THIS: textmate@lists.macromates.com
> (threading gets destroyed and the universe will collapse if you don't)
> http://lists.macromates.com/mailman/listinfo/textmate
______________________________________________________________________
For new threads USE THIS: textmate@lists.macromates.com
(threading gets destroyed and the universe will collapse if you don't)
http://lists.macromates.com/mailman/listinfo/textmate
______________________________________________________________________
(threading gets destroyed and the universe will collapse if you don't)