From f8bdb18fd92ee60370893cc670fa5094062dbcbd Mon Sep 17 00:00:00 2001 From: Matias Linares Date: Wed, 24 Feb 2016 04:14:46 -0300 Subject: Add options for the output directory. This commit changes the command line changing the -d flag to -o, and the input directory is passed on $ARGV[1]. Also update readme :) --- ssg | 77 ++++++++++++++++++++++++++++++++++++++------------------------------- 1 file changed, 42 insertions(+), 35 deletions(-) (limited to 'ssg') diff --git a/ssg b/ssg index 5b522fc..e5b0476 100755 --- a/ssg +++ b/ssg @@ -7,15 +7,16 @@ use Path::Class; use Getopt::Std; # Root in directory. -my $dir; +my $indir; +my $outdir; my $VERSION = "v0.1"; sub help { print<is_dir()) { $str = "$str/" if $file->is_dir(); } else { @@ -115,8 +116,9 @@ sub generate_link { } sub transverse { - my ($directory, $file_needed) = @_; + my ($dirname, $file_needed) = @_; my $retval = ""; + my $directory = dir($dirname); $retval = "