bbscp
Posted 2003-06-05 @ 02:00:56
I often need to make trivial edits on files, and because BBEdit doesn't support SSH, I find myself jumping over to the Terminal to move them to the live site. I'm sure there are other, more robust solutions using CVS, but here's a quick & dirty AppleScript to upload BBEdit's current file to a remote server via scp:
tell application "BBEdit"
activate
get file of first text document
set lpath to POSIX path of result
display dialog "Remote Host:" default answer "example.com"
set dialogInfo to result
set rhost to text returned of dialogInfo
display dialog "Remote Path:" default answer ""
set dialogInfo to result
set rpath to text returned of dialogInfo
set the clipboard to lpath & " " & rhost & ":" & rpath
end tell
do shell script "scp `pbpaste`"
display dialog "Done." buttons {"OK"} default button 1
©2002-2008 kevin c smith