<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Any bash buffs out there?  WordPress update script 2 alpha</title>
	<atom:link href="http://www.thecodecave.com/article305/feed" rel="self" type="application/rss+xml" />
	<link>http://www.thecodecave.com/article305</link>
	<description>Cold storage before my best ideas melt away...</description>
	<pubDate>Tue, 02 Dec 2008 21:45:18 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: Chris Wadge</title>
		<link>http://www.thecodecave.com/article305#comment-64975</link>
		<dc:creator>Chris Wadge</dc:creator>
		<pubDate>Wed, 10 Sep 2008 05:17:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.thecodecave.com/article305#comment-64975</guid>
		<description>I see... not only did you implement basically the same things I suggested, you have the nerve to implement it a year in advance of my suggestions... very sneaky. And after I completely re-wrote your old one for my own use, too! :P Thanks for being a good sport, Brian.

-Chris</description>
		<content:encoded><![CDATA[<p>I see&#8230; not only did you implement basically the same things I suggested, you have the nerve to implement it a year in advance of my suggestions&#8230; very sneaky. And after I completely re-wrote your old one for my own use, too! <img src='http://www.thecodecave.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> Thanks for being a good sport, Brian.</p>
<p>-Chris</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian</title>
		<link>http://www.thecodecave.com/article305#comment-64974</link>
		<dc:creator>Brian</dc:creator>
		<pubDate>Wed, 10 Sep 2008 05:02:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.thecodecave.com/article305#comment-64974</guid>
		<description>Good Suggestions Chris!

In fact the are in place in the subsequent version of the script here:
http://www.thecodecave.com/downloads/EasyWPUpdate.txt

The latest version of this script will always be reachable from:
http://www.thecodecave.com/EasyWPUpdate

(That said I haven't updated it in a year and a half and really should now that I've been living in unix for all that time...)</description>
		<content:encoded><![CDATA[<p>Good Suggestions Chris!</p>
<p>In fact the are in place in the subsequent version of the script here:<br />
<a href="http://www.thecodecave.com/downloads/EasyWPUpdate.txt" rel="nofollow">http://www.thecodecave.com/downloads/EasyWPUpdate.txt</a></p>
<p>The latest version of this script will always be reachable from:<br />
<a href="http://www.thecodecave.com/EasyWPUpdate" rel="nofollow">http://www.thecodecave.com/EasyWPUpdate</a></p>
<p>(That said I haven&#8217;t updated it in a year and a half and really should now that I&#8217;ve been living in unix for all that time&#8230;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Wadge</title>
		<link>http://www.thecodecave.com/article305#comment-64971</link>
		<dc:creator>Chris Wadge</dc:creator>
		<pubDate>Wed, 10 Sep 2008 00:10:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.thecodecave.com/article305#comment-64971</guid>
		<description>Hey there,

  Thanks for your work on this script. I know this article is dusty, but here's a few suggestions. First, explicitely define the shell you're calling, e.g. BASH:

#!/bin/bash

...That will solve problems for people who use unusual shells like FISH or whatever. Next, please make it UTF-8! That will solve a lot of syntax problems across international borders. Finally, some Wordpress updates require a DB update too, not just files. This can accomplished by adding a parallel set of site variables, for example:

BlogURLs[1]="http://somesite.whatever"
BlogURLs[2]="https://anothersite.someplace/blog"
""

...then add another loop to touch the update page(s) with wget (or curl, telnet, etc.):

for CurURLs in "${BlogURLs[@]}"
do
echo "Updating database for: $CurURLs"
# Touch the upgrade script to trigger a DB update if necessary
wget -q -O - $CurURLs/wp-admin/upgrade.php?step=1 &#62; /dev/null
echo "$CurURLs database update complete"
done

All the best,
-Chris</description>
		<content:encoded><![CDATA[<p>Hey there,</p>
<p>  Thanks for your work on this script. I know this article is dusty, but here&#8217;s a few suggestions. First, explicitely define the shell you&#8217;re calling, e.g. BASH:</p>
<p>#!/bin/bash</p>
<p>&#8230;That will solve problems for people who use unusual shells like FISH or whatever. Next, please make it UTF-8! That will solve a lot of syntax problems across international borders. Finally, some Wordpress updates require a DB update too, not just files. This can accomplished by adding a parallel set of site variables, for example:</p>
<p>BlogURLs[1]=&#8221;http://somesite.whatever&#8221;<br />
BlogURLs[2]=&#8221;https://anothersite.someplace/blog&#8221;<br />
&#8220;&#8221;</p>
<p>&#8230;then add another loop to touch the update page(s) with wget (or curl, telnet, etc.):</p>
<p>for CurURLs in &#8220;${BlogURLs[@]}&#8221;<br />
do<br />
echo &#8220;Updating database for: $CurURLs&#8221;<br />
# Touch the upgrade script to trigger a DB update if necessary<br />
wget -q -O - $CurURLs/wp-admin/upgrade.php?step=1 &gt; /dev/null<br />
echo &#8220;$CurURLs database update complete&#8221;<br />
done</p>
<p>All the best,<br />
-Chris</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: upgrade hack windows XP professional to vista home</title>
		<link>http://www.thecodecave.com/article305#comment-61205</link>
		<dc:creator>upgrade hack windows XP professional to vista home</dc:creator>
		<pubDate>Mon, 04 Feb 2008 00:45:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.thecodecave.com/article305#comment-61205</guid>
		<description>&lt;strong&gt;upgrade hack windows XP professional to vista home...&lt;/strong&gt;

haha gotta love Windows......</description>
		<content:encoded><![CDATA[<p><strong>upgrade hack windows XP professional to vista home&#8230;</strong></p>
<p>haha gotta love Windows&#8230;&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian</title>
		<link>http://www.thecodecave.com/article305#comment-6845</link>
		<dc:creator>Brian</dc:creator>
		<pubDate>Fri, 29 Dec 2006 00:01:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.thecodecave.com/article305#comment-6845</guid>
		<description>Odd... You're right it does.  I've never noticed that.  I think it might actually be KSES but it should have no problem with UL and LI .  I wonder if OL makes a different.</description>
		<content:encoded><![CDATA[<p>Odd&#8230; You&#8217;re right it does.  I&#8217;ve never noticed that.  I think it might actually be KSES but it should have no problem with UL and LI .  I wonder if OL makes a different.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael</title>
		<link>http://www.thecodecave.com/article305#comment-6837</link>
		<dc:creator>Michael</dc:creator>
		<pubDate>Thu, 28 Dec 2006 21:38:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.thecodecave.com/article305#comment-6837</guid>
		<description>Your WP theme/stylesheet has "eaten" my unordered list in the comment above. Post looks a bit garbled due to this...</description>
		<content:encoded><![CDATA[<p>Your WP theme/stylesheet has &#8220;eaten&#8221; my unordered list in the comment above. Post looks a bit garbled due to this&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael</title>
		<link>http://www.thecodecave.com/article305#comment-6836</link>
		<dc:creator>Michael</dc:creator>
		<pubDate>Thu, 28 Dec 2006 21:37:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.thecodecave.com/article305#comment-6836</guid>
		<description>OK, here we go. As mentioned via email, I'm not THAT much of a shell-buff, but a few thoughts:


&lt;ul&gt;
	&lt;li&gt;If you provide any sort of backup, then you should also provide a way to restore.&lt;/li&gt;
	&lt;li&gt;A nice-to-have would be the ability to CREATE NEW WordPress-installs. For this of course the script needs to create new databases and users and needs to have SQL-admin priviliges&lt;/li&gt;
	&lt;li&gt;Send emails to the individual blog owners that their WP has been upgraded and that they need to finish the WP-side of the upgrade...
... or - if possible - let your script finish the update itself.&lt;/li&gt;
	&lt;li&gt;Check permissions in all target dir's first&lt;/li&gt;
	&lt;li&gt;Log upgrade process to syslog&lt;/li&gt;
	&lt;li&gt;Set proper permissions after install (fixes errors of previous installs)&lt;/li&gt;
&lt;/ul&gt;

Can't think of anything more right now.</description>
		<content:encoded><![CDATA[<p>OK, here we go. As mentioned via email, I&#8217;m not THAT much of a shell-buff, but a few thoughts:</p>
<ul>
<li>If you provide any sort of backup, then you should also provide a way to restore.</li>
<li>A nice-to-have would be the ability to CREATE NEW WordPress-installs. For this of course the script needs to create new databases and users and needs to have SQL-admin priviliges</li>
<li>Send emails to the individual blog owners that their WP has been upgraded and that they need to finish the WP-side of the upgrade&#8230;<br />
&#8230; or - if possible - let your script finish the update itself.</li>
<li>Check permissions in all target dir&#8217;s first</li>
<li>Log upgrade process to syslog</li>
<li>Set proper permissions after install (fixes errors of previous installs)</li>
</ul>
<p>Can&#8217;t think of anything more right now.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul Mitchell</title>
		<link>http://www.thecodecave.com/article305#comment-6338</link>
		<dc:creator>Paul Mitchell</dc:creator>
		<pubDate>Sat, 23 Dec 2006 16:14:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.thecodecave.com/article305#comment-6338</guid>
		<description>I pointed out the shebang because my preferred shell, fish, doesn't do $RANDOM whereas sh does. As to what is correct, I've little experience of writing shell scripts for wide audiences, so I'd Google for "writing portable unix scripts" and work from there.

I'd use #!/bin/sh unless I knew for sure I could use something else.</description>
		<content:encoded><![CDATA[<p>I pointed out the shebang because my preferred shell, fish, doesn&#8217;t do $RANDOM whereas sh does. As to what is correct, I&#8217;ve little experience of writing shell scripts for wide audiences, so I&#8217;d Google for &#8220;writing portable unix scripts&#8221; and work from there.</p>
<p>I&#8217;d use #!/bin/sh unless I knew for sure I could use something else.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian</title>
		<link>http://www.thecodecave.com/article305#comment-6335</link>
		<dc:creator>Brian</dc:creator>
		<pubDate>Sat, 23 Dec 2006 15:19:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.thecodecave.com/article305#comment-6335</guid>
		<description>Yeah, that's one thing that I was wondering about.  I don't think I used anything that is shell specific, bash, or bourne or whatever.  At least I tried not to.  So, isn't it better then not to specify a preferred shell and let the system do what it will?

Or do I specify #!/bin/sh and assume that any linux sys admin will override it? 

What is the more correct thing to do?

I could write it for bash and get more features, but is that then going to limit the servers?  Does every server have bash?  

Programming is like putting a puzzle together, you know the final picture that you want, But different companies cut the pieces in different shapes.  With each new language you learn, you just have to recognise how the shapes fit together to make the same picture.  But choosing which shebang to use based upon its adoption rate in the *nix world doesn't fit into that analogy.

Any suggestions?</description>
		<content:encoded><![CDATA[<p>Yeah, that&#8217;s one thing that I was wondering about.  I don&#8217;t think I used anything that is shell specific, bash, or bourne or whatever.  At least I tried not to.  So, isn&#8217;t it better then not to specify a preferred shell and let the system do what it will?</p>
<p>Or do I specify #!/bin/sh and assume that any linux sys admin will override it? </p>
<p>What is the more correct thing to do?</p>
<p>I could write it for bash and get more features, but is that then going to limit the servers?  Does every server have bash?  </p>
<p>Programming is like putting a puzzle together, you know the final picture that you want, But different companies cut the pieces in different shapes.  With each new language you learn, you just have to recognise how the shapes fit together to make the same picture.  But choosing which shebang to use based upon its adoption rate in the *nix world doesn&#8217;t fit into that analogy.</p>
<p>Any suggestions?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul Mitchell</title>
		<link>http://www.thecodecave.com/article305#comment-6327</link>
		<dc:creator>Paul Mitchell</dc:creator>
		<pubDate>Sat, 23 Dec 2006 14:21:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.thecodecave.com/article305#comment-6327</guid>
		<description>&lt;a href="http://en.wikipedia.org/wiki/Shebang_(Unix)" rel="nofollow"&gt;shebang&lt;/a&gt;!</description>
		<content:encoded><![CDATA[<p><a href="http://en.wikipedia.org/wiki/Shebang_(Unix)" rel="nofollow">shebang</a>!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.590 seconds -->
