<?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>John Manko</title>
	<atom:link href="http://www.johnmanko.com/blog/feed" rel="self" type="application/rss+xml" />
	<link>http://www.johnmanko.com/blog</link>
	<description>stuff</description>
	<lastBuildDate>Wed, 18 Aug 2010 02:49:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Perl Script To Merge Javadoc Into Single HTML For Printing</title>
		<link>http://www.johnmanko.com/blog/archives/71</link>
		<comments>http://www.johnmanko.com/blog/archives/71#comments</comments>
		<pubDate>Wed, 18 Aug 2010 02:49:20 +0000</pubDate>
		<dc:creator>john</dc:creator>
				<category><![CDATA[Computers & Technology]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://www.johnmanko.com/blog/?p=71</guid>
		<description><![CDATA[I forgot Perl (been about 10 years), but this script I wrote does the job.   Released under GPL v2.  Modify and share as you see fit. #!/usr/bin/perl use Fcntl qw(:flock :seek); use WWW::Mechanize; # Would like to accept the javadoc root path as a parameter. Right now, need to hard code. $allClassesFile = &#34;./allclasses-noframe.html&#34;; my [...]]]></description>
			<content:encoded><![CDATA[<p>I forgot Perl (been about 10 years), but this script I wrote does the job.   Released under GPL v2.  Modify and share as you see fit.</p>
<pre class="brush: perl;">
#!/usr/bin/perl

use Fcntl qw(:flock :seek);
use WWW::Mechanize;

# Would like to accept the javadoc root path as a parameter.  Right now, need to hard code.
$allClassesFile = &quot;./allclasses-noframe.html&quot;;

my $mech = WWW::Mechanize-&gt;new();
$mech-&gt;get( &quot;file:$allClassesFile&quot; );
my @links = $mech-&gt;links();

# This is the new single file
$sitedata=&quot;single.html&quot;;
open(DAT,&quot;&gt;$sitedata&quot;) || die(&quot;Cannot Open File $sitedata&quot;);
flock(DAT, LOCK_EX);
seek(DAT, 0, SEEK_SET);

print DAT &quot;&lt;!DOCTYPE HTML PUBLIC \&quot;-//W3C//DTD HTML 4.01 Transitional//EN\&quot; \&quot;http://www.w3.org/TR/html4/loose.dtd\&quot;&gt;&quot;;
print DAT &quot;&lt;HTML&gt;&lt;HEAD&gt;&lt;META http-equiv=\&quot;Content-Type\&quot; content=\&quot;text/html; charset=ISO-8859-1\&quot;&gt;&quot;;
print DAT &quot;&lt;TITLE&gt;Single Page&lt;/TITLE&gt;&lt;LINK REL =\&quot;stylesheet\&quot; TYPE=\&quot;text/css\&quot; HREF=\&quot;stylesheet.css\&quot; TITLE=\&quot;Style\&quot;&gt;&lt;/HEAD&gt;&lt;BODY BGCOLOR=\&quot;white\&quot;&gt;&quot;;

# Would like to include a table of contents of all classes docs included, with an href=&quot;#someclass&quot; linking to the proper section in the page

# TOC
print DAT &quot;&lt;UL&gt;&quot;;
for my $link ( @links ) {
    $linkText = $link-&gt;text;
    chomp($linkText);
    $linkUrl = $link-&gt;url;
    chomp($linkUrl);
    if (($linkText ne '') &amp;&amp; ($linkUrl ne '')){
      $linkUrl =~ s/\//\./g;
      $linkUrl =~ s/\.html//;
      print DAT &quot;&lt;LI&gt;&lt;a href='#$linkUrl'&gt;$linkUrl&lt;/a&gt;&quot;;
    }
}
print DAT &quot;&lt;/UL&gt;&quot;;
print DAT &quot;&lt;hr  /&gt;&lt;br/&gt;\n&quot;;
print DAT &quot;&lt;div style=\&quot;page-break-before: always;\&quot;&gt;&lt;/div&gt;\n&quot;;

# maybe fix to better handle errors
for my $link ( @links ) {
    $linkText = $link-&gt;text;
    chomp($linkText);
    $linkUrl = $link-&gt;url;
    chomp($linkUrl);
    if (($linkText ne '') &amp;&amp; ($linkUrl ne '')){
      #printf &quot;%s, %s\n&quot;, $linkText, $linkUrl;
      open ACF, &quot;&lt;./$linkUrl&quot;  || die(&quot;Cannot Open File $linkUrl&quot;);
      $infile_contents = do { local $/; &lt;ACF&gt; };
      close ACF;

        # I'm sure there is a better way to split this
      @content = split(/&lt;!-- ======== START OF CLASS DATA ======== --&gt;/, $infile_contents);
      @content = split(/&lt;!-- ========= END OF CLASS DATA ========= --&gt;/, $content[1]);

      print DAT &quot;&lt;a name='$linkUrl'\n&quot;;
      print DAT &quot;$content[0]\n&quot;;
      print DAT &quot;&lt;div style=\&quot;page-break-before: always;\&quot;&gt;&lt;/div&gt;\n&quot;;
    }
}

print DAT &quot;&lt;/BODY&gt;&lt;/HTML&gt;&quot;;
close(DAT);
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.johnmanko.com/blog/archives/71/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Writing a ServletContextListener</title>
		<link>http://www.johnmanko.com/blog/archives/36</link>
		<comments>http://www.johnmanko.com/blog/archives/36#comments</comments>
		<pubDate>Thu, 05 Aug 2010 19:36:08 +0000</pubDate>
		<dc:creator>john</dc:creator>
				<category><![CDATA[Computers & Technology]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[servlet]]></category>

		<guid isPermaLink="false">http://www.johnmanko.com/blog/?p=36</guid>
		<description><![CDATA[A ServletContext listener is useful when you need to perform an action upon application start-up or shutdown, such as initialize application wide variables from a data store. Let&#8217;s look at what Java EE classes we&#8217;ll be using for this demonstration:  ServletContextEvent and ServletContextListener // This is the event class for notifications about changes // to [...]]]></description>
			<content:encoded><![CDATA[<p>A ServletContext listener is useful when you need to perform an action upon application start-up or shutdown, such as initialize application wide variables from a data store.</p>
<p>Let&#8217;s look at what Java EE classes we&#8217;ll be using for this demonstration: <a href="http://download.oracle.com/javaee/5/api/javax/servlet/ServletContextEvent.html"> ServletContextEvent</a> and <a href="http://download.oracle.com/javaee/5/api/javax/servlet/ServletContextListener.html">ServletContextListener</a></p>
<pre class="brush: java;">
// This is the event class for notifications about changes
// to the servlet context of a web application.

import javax.servlet.ServletContextEvent;

// Implementations of this interface receive notifications
// about  changes to the servlet context of the web
// application they are  part of.  To receive notification
// events, the implementation class  must be configured in
// the deployment descriptor for the web  application.

import javax.servlet.ServletContextListener;
</pre>
<p>Our first step is to create a class that implements the ServletContextListener interface.  There are only two methods that require implementations:  <strong>contextInitialized</strong> and <strong>contextDestroyed</strong>.</p>
<p>From the Javadoc:</p>
<blockquote>
<pre>void <strong>contextInitialized</strong>(ServletContextEvent sce)</pre>
<dl>
<dd>
<address>Notification that the web application initialization  process is starting.  All ServletContextListeners are notified of context  initialization before any filter or servlet in the web  application is initialized.</address>
</dd>
<dd> </dd>
</dl>
<pre>void <strong>contextDestroyed</strong>(ServletContextEvent sce)</pre>
<dl>
<dd>
<address>Notification that the servlet context is about to be shut down.  All servlets and filters have been destroy()ed before any  ServletContextListeners are notified of context  destruction. </address>
</dd>
</dl>
</blockquote>
<p>Below is our listener class.  You&#8217;ll notice that I&#8217;ve included a  <strong>@PersistenceUnit</strong> annotation.  Since context listeners are created by the  servlet container, all dependency injections occur as requested.</p>
<pre class="brush: java;">

package com.manko.servlet.listener;
public class MyAwesomeContextListener implements ServletContextListener {

    /* Needed in order to get the application values from our data store  */
    @PersistenceUnit
    private EntityManagerFactory emf;

    @Override
    public void contextInitialized(ServletContextEvent sce) {
    }

    @Override
    public void contextDestroyed(ServletContextEvent sce) {
    }
}
</pre>
<p>Now, let&#8217;s add code to <strong>contextInitialized</strong>.  Assuming we have an entity class ApplicationConfiguration</p>
<pre class="brush: java;">
        EntityManager em = null;
	Query query = null;
	Hashtable table = null;

	try {
		// Get configuration entries
		em = emf.createEntityManager();
	        query = em.createNamedQuery(&quot;ApplicationConfiguration.findAll&quot;);
	        List&lt;ApplicationConfiguration&gt; configs = (List&lt;ApplicationConfiguration&gt;) query.getResultList();

		// Put them in a Hashtable for easy reference
	        table = new Hashtable(configs.size());

	        for (ApplicationConfiguration config:configs){
	            table.put(config.getId(), config.getValue());
	        }

		// Save the Hashtable as a ServerContext variable
	        sce.getServletContext().setAttribute(&quot;MyApplicationConfiguration&quot;, table);

	} catch (Excception e) {
		// do stuff
	}

        em = null;
        query = null;
        table = null;
</pre>
<p>Of course, simply coding a context listener is meaningless without informing the container.   There are two ways to accomplish this.</p>
<ul>
<li>If you are running within a version 2.5 servlet container, an xml deployment descriptor is your only option.</li>
<li>For version 3.0 containers, you may annotate your class with @WebListener</li>
</ul>
<pre> 
</pre>
<p>v2.5 (web.xml &#8211; Glassfish 2.1 for example):</p>
<pre class="brush: xml;">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;web-app version=&quot;2.5&quot;
	 xmlns=&quot;http://java.sun.com/xml/ns/javaee&quot;
	 xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
	 xsi:schemaLocation=&quot;http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd&quot;&gt;
    &lt;listener&gt;
        &lt;listener-class&gt;com.manko.servlet.listener.MyAwesomeContextListener&lt;/listener-class&gt;
    &lt;/listener&gt;
&lt;/web-app&gt;
</pre>
<p>v3.0 (annotations &#8211; Glassfish 3.0 for example):</p>
<pre class="brush: xml;">
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.annotation.WebListener;

@WebListener
public class MyAwesomeContextListener implements ServletContextListener
</pre>
<p>IMPORTANT &#8211; This is from the Servlet 3.0 specification (p180):</p>
<blockquote><p>The web application deployment descriptor contains a metadata-complete attribute on the web-app element. The metadata-complete attribute defines whether the web.xml descriptor is complete, or whether other sources of metadata used by the deployment process should be considered. Metadata may come from the web.xml file, web-fragment.xml files, annotations on class files in WEB-INF/classes, and annotations on classes in jar files in the WEB-INF/lib directory.  If metadata-complete is set to &#8220;true&#8221;, the deployment tool only examines the web.xml file and must ignore annotations such as @WebServlet, @WebFilter, and @WebListener present in the class files of the application, and must also ignore any web-fragment.xml descriptor packaged in a jar file in WEB-INF/lib. If the metadata-complete attribute is not specified or is set to &#8220;false&#8221;, the deployment tool must examine the class files and web-fragment.xml files for metadata,as previously specified.</p></blockquote>
<p>That&#8217;s it!   We now have a servlet context listener in our application.  Please, do yourself a favor and read the <a href="http://jcp.org/aboutJava/communityprocess/final/jsr315/index.html">Servlet 3.0 specification</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.johnmanko.com/blog/archives/36/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Solution to Our Economic Problems is Not More Government</title>
		<link>http://www.johnmanko.com/blog/archives/32</link>
		<comments>http://www.johnmanko.com/blog/archives/32#comments</comments>
		<pubDate>Tue, 06 Oct 2009 16:52:45 +0000</pubDate>
		<dc:creator>john</dc:creator>
				<category><![CDATA[Politics & Law]]></category>

		<guid isPermaLink="false">http://www.johnmanko.com/blog/?p=32</guid>
		<description><![CDATA[Everyone I know is having some form of economic hardship (wages, taxes, etc). Some blame politicians, others capitalism, and some terrorism and the uncertainty of national security. Some just consider &#8220;the economy&#8221; a super-natural being that&#8217;s guided by some mysterious force of which we&#8217;re in a continual struggle to find the &#8220;economic answer.&#8221; Whatever your [...]]]></description>
			<content:encoded><![CDATA[<p>Everyone I know is having some form of economic hardship (wages, taxes, etc). Some blame politicians, others capitalism, and some terrorism and the uncertainty of national security. Some just consider &#8220;the economy&#8221; a super-natural being that&#8217;s guided by some mysterious force of which we&#8217;re in a continual struggle to find the &#8220;economic answer.&#8221;</p>
<p>Whatever your target, the real problem it that most really only look at patching the problem, masking with more legislation, more social programs (universal health care), more war (Iran). What if, just what if, we all turned our heads toward the source of the problems instead of trying to legislate or bomb them away? What if we all realized that it is too much government involvement (and I&#8217;m not advocating an anarchist society, but a small government, limited in power, that enforces the Constitution to maximize personal freedom) leads to big government, which leads to a lessening of economic, physical, and mental freedoms.</p>
<p>That, of course, would require us to educate ourselves, rejecting bullshit news organizations like Fox News or CNN or MSNBC, who&#8217;s &#8220;reporting&#8221; is politically motivated and geared towards entertaining us, rather than informing us. After all, they are in the business of television ratings, competing for the same air time as MTV&#8217;s Jackass and Paris Hilton&#8217;s My New BFF.</p>
<p>So, this is your homework, the friends and family I care about:<br />
Read the following, to start, and the rest I leave up to you. If you have any questions, please ask me, and if I don&#8217;t have an answer I can help you research:</p>
<p>The Big Takeover(Rolling Stone Magazine) by MATT TAIBBI<br />
<a href="http://www.rollingstone.com/politics/story/26793903/the_big_takeover">http://www.rollingstone.com/politics/story/26793903/the_big_takeover</a></p>
<p>President Jackson&#8217;s Veto Message Regarding the Bank of the United States; July 10, 1832<br />
<a href="http://avalon.law.yale.edu/19th_century/ajveto01.asp">http://avalon.law.yale.edu/19th_century/ajveto01.asp</a></p>
<p>THE STATE OF THE NATION by Andrew Jackson<br />
<a href="http://xroads.virginia.edu/~cap/jackson/jack~1.htm">http://xroads.virginia.edu/~cap/jackson/jack~1.htm</a></p>
<p>The Creature from Jekyll Island by Edward Griffin<br />
<a href="http://www.amazon.com/Creature-Jekyll-Island-Federal-Reserve/dp/0912986395/ref=ntt_at_ep_dpi_1">http://www.amazon.com/Creature-Jekyll-Island-Federal-Reserve/dp/0912986395/ref=ntt_at_ep_dpi_1</a></p>
<p>End The Fed<br />
<a href="and for those interested, contact your representative to support HR 1207 - Federal Reserve Transparency Act of 2009  http://www.govtrack.us/congress/bill.xpd?bill=h111-1207">http://www.amazon.com/End-Fed-Ron-Paul/dp/0446549193/ref=pd_sim_b_2</a></p>
<p>And for those interested, contact your representative to support HR 1207 &#8211; Federal Reserve Transparency Act of 2009<br />
<a href="and for those interested, contact your representative to support HR 1207 - Federal Reserve Transparency Act of 2009  http://www.govtrack.us/congress/bill.xpd?bill=h111-1207">http://www.govtrack.us/congress/bill.xpd?bill=h111-1207</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.johnmanko.com/blog/archives/32/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>G20 Police Attack Pitt Students</title>
		<link>http://www.johnmanko.com/blog/archives/29</link>
		<comments>http://www.johnmanko.com/blog/archives/29#comments</comments>
		<pubDate>Tue, 29 Sep 2009 23:23:44 +0000</pubDate>
		<dc:creator>john</dc:creator>
				<category><![CDATA[Civil Liberties]]></category>

		<guid isPermaLink="false">http://www.johnmanko.com/blog/?p=29</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="345" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="bgcolor" value="#ffffff" /><param name="flashvars" value="pageurl=http://www.ebaumsworld.com/video/watch/80762164/&amp;file=http://media.ebaumsworld.com/mediaFiles/video/112403/80762164.flv&amp;mediaid=80762164&amp;title=G20 2009 Police Attack Students at University of Pittsburgh&amp;tags=breaking,news,riots,accoustic,weapons,nwo,new,order,obama,g20,police,state,riot,pnc,bank&amp;description=Your not going to see this on MSNBC/CNN or FOX.  &amp;displayheight=325&amp;backcolor=0x0d0d0d&amp;lightoclor=0x336699&amp;frontcolor=0xcccccc&amp;image=http://media.ebaumsworld.com/2009/09/80762164/police2.jpg&amp;username=Dawnthief" /><param name="src" value="http://www.ebaumsworld.com/player.swf" /><param name="wmode" value="transparent" /><param name="quality" value="high" /><embed type="application/x-shockwave-flash" width="425" height="345" src="http://www.ebaumsworld.com/player.swf" quality="high" wmode="transparent" flashvars="pageurl=http://www.ebaumsworld.com/video/watch/80762164/&amp;file=http://media.ebaumsworld.com/mediaFiles/video/112403/80762164.flv&amp;mediaid=80762164&amp;title=G20 2009 Police Attack Students at University of Pittsburgh&amp;tags=breaking,news,riots,accoustic,weapons,nwo,new,order,obama,g20,police,state,riot,pnc,bank&amp;description=Your not going to see this on MSNBC/CNN or FOX.  &amp;displayheight=325&amp;backcolor=0x0d0d0d&amp;lightoclor=0x336699&amp;frontcolor=0xcccccc&amp;image=http://media.ebaumsworld.com/2009/09/80762164/police2.jpg&amp;username=Dawnthief" bgcolor="#ffffff"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.johnmanko.com/blog/archives/29/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Case Against JPA</title>
		<link>http://www.johnmanko.com/blog/archives/16</link>
		<comments>http://www.johnmanko.com/blog/archives/16#comments</comments>
		<pubDate>Mon, 28 Sep 2009 20:09:16 +0000</pubDate>
		<dc:creator>john</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://www.johnmanko.com/blog/?p=16</guid>
		<description><![CDATA[Here are some numbers for JPA generated queries verses a custom formatted one: Based on the following query: em.createQuery(&#34; SELECT object(o) FROM INTERNALIPADDRESSBINDING o WHERE o.internalIpAddress.ipAddress = :ip AND o.macAddress.macAddress = :mac AND o.bindTimestamp = :bind &#34;) JPA generated query based on Entity classes and foreign keys: SELECT t0.ID, t0.BINDTIMESTAMP, t0.MACADDRESS_MACADDRESS, t0.internalIpAddress_ipAddress FROM INTERNALIPADDRESSBINDING t0, [...]]]></description>
			<content:encoded><![CDATA[<p>Here are some numbers for JPA generated queries verses a custom formatted one:</p>
<p>Based on the following query:</p>
<pre class="brush: java;">
em.createQuery(&quot; SELECT object(o) FROM INTERNALIPADDRESSBINDING o WHERE o.internalIpAddress.ipAddress = :ip AND o.macAddress.macAddress = :mac AND o.bindTimestamp = :bind &quot;)
</pre>
<p><strong>JPA generated query based on Entity classes and foreign keys:</strong></p>
<pre class="brush: sql;">
SELECT t0.ID,
       t0.BINDTIMESTAMP,
       t0.MACADDRESS_MACADDRESS,
       t0.internalIpAddress_ipAddress
FROM   INTERNALIPADDRESSBINDING t0,
       MACADDRESS t2,
       INTERNALIPADDRESS t1
WHERE  ((
         ((t1.IPADDRESS ='4.4.4.4') AND (t2.MACADDRESS = 'ZZ:ZZ:ZZ:ZZ:ZZ:ZZ'))
         AND
         (t0.BINDTIMESTAMP = '2009-09-22 15:01:53.0')
        )
        AND
        (
         (t1.IPADDRESS =t0.internalIpAddress_ipAddress)
         AND
         (t2.MACADDRESS = t0.MACADDRESS_MACADDRESS)
        )
       );

 Empty set (20.53 sec)
</pre>
<p><strong>My query:</strong></p>
<pre class="brush: sql;">
SELECT t0.ID,
       t0.BINDTIMESTAMP,
       t0.MACADDRESS_MACADDRESS,
       t0.INTERNALIPADDRESS_IPADDRESS
FROM   INTERNALIPADDRESSBINDING t0
WHERE  t0.INTERNALIPADDRESS_IPADDRESS = '4.4.4.4'
   AND t0.MACADDRESS_MACADDRESS = 'ZZ:ZZ:ZZ:ZZ:ZZ:ZZ'
   AND t0.BINDTIMESTAMP = '2009-09-22 15:01:53.0';

 Empty set (1.35 sec)
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.johnmanko.com/blog/archives/16/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Scripting SVN Repo Creation in Gentoo</title>
		<link>http://www.johnmanko.com/blog/archives/7</link>
		<comments>http://www.johnmanko.com/blog/archives/7#comments</comments>
		<pubDate>Mon, 28 Sep 2009 17:31:55 +0000</pubDate>
		<dc:creator>john</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[gentoo]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://www.johnmanko.com/blog/?p=7</guid>
		<description><![CDATA[I wrote a script to ease the creation of subversion repositories in Gentoo.  This script assumes the existence of three files: authz - Standard svn authorization file, located svn root conf directory, used for all repos. passwd - Standard passwd file, and is used for all repos. svnserve.conf - Template file (points back to authz [...]]]></description>
			<content:encoded><![CDATA[<p>I wrote a script to ease the creation of subversion repositories in Gentoo.  This script assumes the existence of three files:</p>
<pre>authz         - Standard svn authorization file,
                located svn root conf directory,
                used for all repos.
passwd        - Standard passwd file, and
                is used for all repos.
svnserve.conf - Template file (points back to
                authz &amp; passwd), copied to each
                newly created repo conf
                directory.
</pre>
<p>Here is the script:</p>
<pre class="brush: bash;">

#! /bin/bash
REPO_ROOT=/var/svn

echo -n &quot;New Repository Name: &quot;
read -e REPO_NAME

if [ &quot;$REPO_NAME&quot; = &quot;&quot; ]; then
 echo &quot;A valid repository name must be entered.  Cannot create repository.&quot;;
 exit;
fi

REPO_PATH=$REPO_ROOT/$REPO_NAME

if [ -e $REPO_PATH ]; then
 echo &quot;The file or directory ($REPO_PATH) already exists.  Cannot create repository.&quot;;
 exit;
fi

svnadmin create $REPO_PATH
cp $REPO_ROOT/conf/svnserve.conf $REPO_PATH/conf/
rm $REPO_PATH/conf/authz
rm $REPO_PATH/conf/passwd
chown -R svn:svnusers $REPO_PATH
chmod -R g+w $REPO_PATH
chmod -R o-rwx $REPO_PATH
/etc/init.d/svnserve restart

echo $REPO_PATH has been created!</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.johnmanko.com/blog/archives/7/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Back in Business</title>
		<link>http://www.johnmanko.com/blog/archives/3</link>
		<comments>http://www.johnmanko.com/blog/archives/3#comments</comments>
		<pubDate>Sun, 27 Sep 2009 19:02:44 +0000</pubDate>
		<dc:creator>john</dc:creator>
				<category><![CDATA[Thoughts]]></category>

		<guid isPermaLink="false">http://www.johnmanko.com/blog/?p=3</guid>
		<description><![CDATA[I finally set this site up again.  I hope I can keep the posts going (ie, time).  Look for weekly posting, especially re music and coding.  ;)  enjoy. btw, I can&#8217;t stop sneezing.]]></description>
			<content:encoded><![CDATA[<p>I finally set this site up again.  I hope I can keep the posts going (ie, time).  Look for weekly posting, especially re music and coding.  ;)  enjoy.</p>
<p>btw, I can&#8217;t stop sneezing.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.johnmanko.com/blog/archives/3/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
