<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Trey Runcie &#187; rsync</title>
	<atom:link href="http://treyruncie.com/tag/rsync/feed/" rel="self" type="application/rss+xml" />
	<link>http://treyruncie.com</link>
	<description></description>
	<lastBuildDate>Mon, 07 May 2012 21:26:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Work Locally Save Remotely with Textmate</title>
		<link>http://treyruncie.com/2008/11/work-locally-save-remotely-with-textmate/</link>
		<comments>http://treyruncie.com/2008/11/work-locally-save-remotely-with-textmate/#comments</comments>
		<pubDate>Sat, 29 Nov 2008 18:36:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Textmate]]></category>
		<category><![CDATA[rsync]]></category>
		<category><![CDATA[shell script]]></category>
		<category><![CDATA[textmate bundle]]></category>

		<guid isPermaLink="false">http://treyruncie.com/?p=20</guid>
		<description><![CDATA[This is a method of working on a project locally and saving to a remote staging server. You will need to be able to rsync to the remote computer without using a password. For this you will need to set up an ssh key. Add the following shell script to Textmate as a command with [...]]]></description>
			<content:encoded><![CDATA[<p>This is a method of working on a project locally and saving to a remote staging server.</p>
<p>You will need to be able to rsync to the remote computer without using a password. For this you will need to set up an ssh key.</p>
<p>Add the following shell script to Textmate as a command with input is set to none, output is set to Show as tooltip and my key equivalent is set to control+command+s (or whatever you like)</p>
<pre>RSYNC_USER=${RSYNC_USER:-defaultUsername}
RSYNC_HOST=${RSYNC_HOST:-defaultHost}
if [ "${RSYNC_DIR}"  ]; then
	rsync -av --exclude "CVS*" --exclude "*.kpf" --exclude ".DS_Store" $RSYNC_DIR $RSYNC_USER@$RSYNC_HOST:$RSYNC_REMOTE
fi</pre>
<p>Textmate can accept variables for this script on a per project basis. To do this open your project, make sure no files are hi-lighted in the project drawer then click on the &#8220;i&#8221; info icon at the bottom of the project drawer. Here you can add your required variables.<br />
RSYNC_USER The user<br />
RSYNC_DIR The local directory from which the rsync will be made. eg. &#8220;/User/me/Sites/myProject/&#8221;<br />
RSYNC_REMOTE The remote directory in which to rsync. eg. &#8220;/var/www/myProject&#8221;<br />
RSYNC_HOST The host name of the remote server.</p>
<p>Tip: It is always a good idea to echo out the rsync command and have a look at what it is doing before you let it run.</p>
<p><img class="alignnone" src="http://img.skitch.com/20081130-1ipqqdj2mh7upd7e5cskb77cng.jpg" alt="" width="574" height="388" /></p>
]]></content:encoded>
			<wfw:commentRss>http://treyruncie.com/2008/11/work-locally-save-remotely-with-textmate/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

