<?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>This is my blog &#187; bash</title>
	<atom:link href="http://www.ronniealleva.org/index.php/category/bash/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ronniealleva.org</link>
	<description>There are many like it but this one is mine</description>
	<lastBuildDate>Mon, 10 May 2010 07:06:51 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to create a tar of files you have updated in SVN</title>
		<link>http://www.ronniealleva.org/index.php/2008/07/29/how-to-create-a-tar-of-files-you-have-updated-in-svn/</link>
		<comments>http://www.ronniealleva.org/index.php/2008/07/29/how-to-create-a-tar-of-files-you-have-updated-in-svn/#comments</comments>
		<pubDate>Tue, 29 Jul 2008 23:35:32 +0000</pubDate>
		<dc:creator>Ronnie</dc:creator>
				<category><![CDATA[bash]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.ronniealleva.org/index.php/2008/07/29/how-to-create-a-tar-of-files-you-have-updated-in-svn/</guid>
		<description><![CDATA[I had to recently send some modified files to someone so that they could take a look at what I was doing.  OH NOES!  How do I gather them all up at once?

tar cvzf somefile.tar.gz `svn stat &#124; awk '{print &#34;test -f &#34; $2 &#34; &#38;&#38; echo &#34; $2}' &#124; bash`

Word.
To break it down:
The svn [...]]]></description>
			<content:encoded><![CDATA[<p>I had to recently send some modified files to someone so that they could take a look at what I was doing.  OH NOES!  How do I gather them all up at once?</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">tar</span> cvzf somefile.tar.gz <span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">svn</span> <span style="color: #c20cb9; font-weight: bold;">stat</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #ff0000;">'{print &quot;test -f &quot; $2 &quot; &amp;&amp; echo &quot; $2}'</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">bash</span><span style="color: #000000; font-weight: bold;">`</span></pre></div></div>

<p><strong>Word.</strong></p>
<p>To break it down:</p>
<p>The svn stat command is getting all the files that have changed obviously.</p>
<p>The awk command its piped to is the real part that&#8217;s doing the work.  The awk command prints</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">test</span> <span style="color: #660033;">-f</span> <span style="color: #c20cb9; font-weight: bold;">file</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #c20cb9; font-weight: bold;">file</span></pre></div></div>

<p>Pipe that through bash, and you have commands, which essentially will echo the file if the file is a file.  Simple?  No?  I mean, it will not print it out if it&#8217;s a directory, so you don&#8217;t have to worry about it adding entire directories.</p>
<p>Surround that whole thing in backquotes (that&#8217;s the one with the tilde (that&#8217;s the one next to the &#8216;1&#8242; key ( I&#8217;m not telling you where the &#8216;1&#8242; key is)))  and give it as the argument to the tar command.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ronniealleva.org/index.php/2008/07/29/how-to-create-a-tar-of-files-you-have-updated-in-svn/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
