<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: My first shell script: bundlemaker</title>
	<atom:link href="http://blog.melchua.com/2008/05/14/my-first-shell-script-bundlemaker/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.melchua.com/2008/05/14/my-first-shell-script-bundlemaker/</link>
	<description>Braindump of the Mel. Seek coherency and relevance at your own risk.</description>
	<lastBuildDate>Thu, 29 Jul 2010 16:44:01 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Tom</title>
		<link>http://blog.melchua.com/2008/05/14/my-first-shell-script-bundlemaker/comment-page-1/#comment-712</link>
		<dc:creator>Tom</dc:creator>
		<pubDate>Sun, 18 May 2008 13:08:26 +0000</pubDate>
		<guid isPermaLink="false">http://blog.melchua.com/2008/05/14/my-first-shell-script-bundlemaker/#comment-712</guid>
		<description>Here are some suggestions:

- Set the arguments $1, $2, $3 tolocal variables to make it more readable, e.g. URL=$1, DEST=$2, LANG=$3

- Do some basic validation of the input arguments - e.g. URL starts with http, ftp, etc., DEST does not already exist as a directory, filename or $2.xol, DEST does not contain a slash &quot;/&quot;, LANG is a supported language

- Check return codes of key commands you execute - i.e. &quot;if [$? -ne 0] then&quot; -- in many instances, this is a fatal error so you&#039;d cleanup and exit with some message.  For example, check the return codes of wget, mkdir and zip.

- Use &#039;rm -rf &quot;$2&quot;&#039; with extreme caution - what if someone specified &quot;/&quot; as $2?  As noted above, you should ensure that $2 does not already exist, etc.</description>
		<content:encoded><![CDATA[<p>Here are some suggestions:</p>
<p>- Set the arguments $1, $2, $3 tolocal variables to make it more readable, e.g. URL=$1, DEST=$2, LANG=$3</p>
<p>- Do some basic validation of the input arguments &#8211; e.g. URL starts with http, ftp, etc., DEST does not already exist as a directory, filename or $2.xol, DEST does not contain a slash &#8220;/&#8221;, LANG is a supported language</p>
<p>- Check return codes of key commands you execute &#8211; i.e. &#8220;if [$? -ne 0] then&#8221; &#8212; in many instances, this is a fatal error so you&#8217;d cleanup and exit with some message.  For example, check the return codes of wget, mkdir and zip.</p>
<p>- Use &#8216;rm -rf &#8220;$2&#8243;&#8216; with extreme caution &#8211; what if someone specified &#8220;/&#8221; as $2?  As noted above, you should ensure that $2 does not already exist, etc.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dwins</title>
		<link>http://blog.melchua.com/2008/05/14/my-first-shell-script-bundlemaker/comment-page-1/#comment-703</link>
		<dc:creator>dwins</dc:creator>
		<pubDate>Sat, 17 May 2008 14:24:16 +0000</pubDate>
		<guid isPermaLink="false">http://blog.melchua.com/2008/05/14/my-first-shell-script-bundlemaker/#comment-703</guid>
		<description>hey Mel, I DRY&#039;ed your script up a bit and updated the wiki.  Note the (echo echo echo) pattern for the ini file, it&#039;s pretty handy.  The paren&#039;s basically open a second shell so a sequence of commands can be redirected, etc. as one.</description>
		<content:encoded><![CDATA[<p>hey Mel, I DRY&#8217;ed your script up a bit and updated the wiki.  Note the (echo echo echo) pattern for the ini file, it&#8217;s pretty handy.  The paren&#8217;s basically open a second shell so a sequence of commands can be redirected, etc. as one.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
