From: Chris W. <la...@us...> - 2005-03-29 17:17:56
|
Update of /cvsroot/openinteract/OpenInteract2/script In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11586 Modified Files: oi2_manage Log Message: move directory munging after the meta tasks; allow relative directories to be used Index: oi2_manage =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/script/oi2_manage,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** oi2_manage 17 Mar 2005 14:58:06 -0000 1.34 --- oi2_manage 29 Mar 2005 17:17:45 -0000 1.35 *************** *** 6,9 **** --- 6,10 ---- use Cwd qw( cwd ); use Data::Dumper qw( Dumper ); + use File::Spec::Functions qw( rel2abs ); use Getopt::Long qw( GetOptions ); use Log::Log4perl qw( :levels ); *************** *** 107,119 **** } - # Lop off any trailing '/' characters in directories passed in, - # replace any initial '~' with $ENV{HOME} - - for ( $OPT{website_dir}, $OPT{package_dir}, $OPT{source_dir} ) { - next unless defined $_; - s/[\\|\/]+$//; - s/^~/$ENV{HOME}/ - } - # Do any help/non-Manage tasks here --- 108,111 ---- *************** *** 140,143 **** --- 132,143 ---- } + # directory munging... + foreach my $dir_type ( qw( website_dir package_dir source_dir ) ) { + next unless defined $OPT{ $dir_type }; + $OPT{ $dir_type } =~ s/^~/$ENV{HOME}/; + $OPT{ $dir_type } = rel2abs( $OPT{ $dir_type } ); + $OPT{ $dir_type } =~ s/[\\|\/]+$//; + } + # delete our own entries... delete @OPT{ qw( help man verbose task ) }; |