Code

contrib/migrate-3-4.px: Added usage information.
authorFlorian Forster <octo@leeloo.lan.home.verplant.org>
Fri, 25 May 2007 17:47:04 +0000 (19:47 +0200)
committerFlorian Forster <octo@leeloo.lan.home.verplant.org>
Fri, 25 May 2007 17:47:04 +0000 (19:47 +0200)
contrib/migrate-3-4.px

index cbbc179b8fb7f394e45f87037ccb78e55826d8d4..31abae4b38f52c41c62f918972768a4e30a884c4 100755 (executable)
@@ -125,7 +125,7 @@ our %TypeRename =
 
 GetOptions ("indir|i=s" => \$InDir,
        "outdir|o=s" => \$OutDir,
-       "hostname=s" => \$Hostname) or exit (1);
+       "hostname=s" => \$Hostname) or exit_usage ();
 
 die "No such directory: $InDir" if (!-d $InDir);
 
@@ -374,3 +374,11 @@ sub special_disk
        $dest_filename = get_filename ($dest);
        print "./extractDS.px -i '$InDir/$orig_filename' -s 'rtime' -s 'wtime' -o '$OutDir/$dest_filename' -d 'read' -d 'write'\n";
 }
+
+sub exit_usage
+{
+       print <<EOF;
+Usage: $0 [-i indir] [-o outdir] [--hostname myhostname]
+EOF
+       exit (1);
+}