diff options
author | elliott_c <ocielliottc@users.noreply.github.com> | 2004-04-30 16:52:36 +0000 |
---|---|---|
committer | elliott_c <ocielliottc@users.noreply.github.com> | 2004-04-30 16:52:36 +0000 |
commit | 962a7d41f6eb91b5a1cc56da3b1783becbd08eaa (patch) | |
tree | 11a888d92bbf43749d3b1be93e319351503ef83e /prj_install.pl | |
parent | 995499f29230a68b8c7ba504be923004fc2649eb (diff) | |
download | MPC-962a7d41f6eb91b5a1cc56da3b1783becbd08eaa.tar.gz |
ChangeLogTag: Fri Apr 30 11:47:48 2004 Chad Elliott <elliott_c@ociweb.com>
Diffstat (limited to 'prj_install.pl')
-rwxr-xr-x | prj_install.pl | 39 |
1 files changed, 25 insertions, 14 deletions
diff --git a/prj_install.pl b/prj_install.pl index cba65df1..ba65a0ac 100755 --- a/prj_install.pl +++ b/prj_install.pl @@ -17,17 +17,23 @@ use FileHandle; use File::Copy; use File::Basename; -# ************************************************************ +# ****************************************************************** # Data Section -# ************************************************************ +# ****************************************************************** -my($insext) = 'ins'; +my($insext) = 'ins'; my($version) = '$Id$'; $version =~ s/.*\s+(\d+[\.\d]+)\s+.*/$1/; -# ************************************************************ +my(%defaults) = ('header_files' => 1, + 'idl_files' => 1, + 'inline_files' => 1, + 'template_files' => 1, + ); + +# ****************************************************************** # Subroutine Section -# ************************************************************ +# ****************************************************************** sub copyFiles { my($files) = shift; @@ -67,10 +73,10 @@ sub loadInsFiles { my($files) = shift; my($tags) = shift; my($verbose) = shift; + my($fh) = new FileHandle(); my(@copy) = (); foreach my $file (@$files) { - my($fh) = new FileHandle(); if (open($fh, $file)) { if ($verbose) { print "Loading $file\n"; @@ -149,23 +155,28 @@ sub usageAndExit { "in $insext files.\n\n", "-a Adds to the default set of tags that get copied.\n", "-s Sets the tags that get copied.\n", - "-v Enables verbose mode.\n"; + "-v Enables verbose mode.\n", + "\n", + "The default set of tags are:\n"; + my($first) = 1; + foreach my $key (sort keys %defaults) { + print STDERR '', ($first ? '' : ', '), $key; + $first = 0; + } + print STDERR "\n"; + exit(0); } -# ************************************************************ +# ****************************************************************** # Main Section -# ************************************************************ +# ****************************************************************** my($verbose) = undef; my($first) = 1; my($insdir) = undef; my(@insfiles) = (); -my(%tags) = ('header_files' => 1, - 'idl_files' => 1, - 'inline_files' => 1, - 'template_files' => 1, - ); +my(%tags) = %defaults; for(my $i = 0; $i <= $#ARGV; ++$i) { my($arg) = $ARGV[$i]; |