FAQ
cvsuser 02/07/10 22:48:17

Modified: bin splitfaq
Log:
* made the destination directory a command line argument because i
couldn't decide what it should be. i should rework this so
that it doesn't look stupid. :)

Revision Changes Path
1.2 +10 -1 perlfaq/bin/splitfaq

Index: splitfaq
===================================================================
RCS file: /cvs/public/perlfaq/bin/splitfaq,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -w -r1.1 -r1.2
--- splitfaq 6 Jul 2002 03:33:57 -0000 1.1
+++ splitfaq 11 Jul 2002 05:48:16 -0000 1.2
@@ -3,7 +3,16 @@
use strict;
use warnings;

-my $dir = "$ENV{HOME}/faqs";
+unless( defined $ARGV[0] )
+ {
+ die "Please specify the destination directory\n";
+ }
+
+my $dir = shift @ARGV;
+unless( -d $dir )
+ {
+ mkdir $dir, 0755 or die "Could not create $dir: $!";
+ }

my $skip = 1;
my $faq;

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcvs-perlfaq @
categoriesperl
postedJul 11, '02 at 5:49a
activeJul 11, '02 at 5:49a
posts1
users1
websitelearn.perl.org...

1 user in discussion

Comdog: 1 post

People

Translate

site design / logo © 2018 Grokbase