aboutsummaryrefslogtreecommitdiff
path: root/par
diff options
context:
space:
mode:
authorjthorn <jthorn@e296648e-0e4f-0410-bd07-d597d9acff87>2002-06-16 20:11:27 +0000
committerjthorn <jthorn@e296648e-0e4f-0410-bd07-d597d9acff87>2002-06-16 20:11:27 +0000
commitcec58c914b1b3a7baad3acabfbdf6c211615c416 (patch)
tree9f9579e745fabf9e5c5dc40f3acd7d43db2812c8 /par
parentdfe7d766284b843bae39dfe532a0eb94389e887b (diff)
add a --help message
git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinInitialData/Exact/trunk@104 e296648e-0e4f-0410-bd07-d597d9acff87
Diffstat (limited to 'par')
-rwxr-xr-xpar/convert-pars.pl37
1 files changed, 24 insertions, 13 deletions
diff --git a/par/convert-pars.pl b/par/convert-pars.pl
index c6783c2..5bca870 100755
--- a/par/convert-pars.pl
+++ b/par/convert-pars.pl
@@ -1,19 +1,21 @@
#! /usr/bin/perl -i.bak
# $Header$
-#
-# This perl script converts old parameter files for this thorn to use
-# the new (June 2002) parameter names.
-#
-# Usage:
-# convert-pars.pl myrun.par myrun2.par ...
-#
-# This will rename the original files to myrun.par.bak, myrun2.par.bak, ...,
-# and write new parameter files myrun.par, myrun2.par, ... .
-#
-# This script can be fooled by \-line-continues in strange places or
-# other lexical wierdness, but in practice it should work for almost all
-# "reasonable" parameter files.
+my $help_msg = <<'EOF';
+This perl script converts old parameter files for this thorn to use
+the new (June 2002) parameter names.
+
+Usage:
+ convert-pars.pl myparfile.par myparfile2.par ...
+
+This will write new parameter files myparfile.par, myparfile2.par, ... ,
+renaming the original files to myparfile.par.bak, myparfile2.par.bak, ... .
+
+This script can be fooled by \-line-continues in strange places or
+other lexical wierdness, but in practice it should work for almost all
+"reasonable" parameter files.
+EOF
+
#
# Assumptions:
# - We assume that the exactmodel/exact_model parameter is specified
@@ -23,6 +25,15 @@
################################################################################
+if ( (scalar(@ARGV) == 1)
+ && (($ARGV[0] eq '-help') || ($ARGV[0] eq '--help')) )
+ {
+ print $help_msg;
+ exit;
+ }
+
+########################################
+
my $exact_model;
while (<>)