From 5e277a8d977d7531a2c744da37bb70b89bec2ae1 Mon Sep 17 00:00:00 2001 From: Richard Tucker Date: Fri, 25 Jul 1997 16:30:26 +0100 Subject: [PATCH] Flags to work in nt Copied from Perforce Change: 18498 ServerID: perforce.ravenbrook.com --- mps/qa/test/script/commands/index | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/mps/qa/test/script/commands/index b/mps/qa/test/script/commands/index index 2eb98a3460b..8a8409903e0 100644 --- a/mps/qa/test/script/commands/index +++ b/mps/qa/test/script/commands/index @@ -6,6 +6,8 @@ &options(); +print $platform_phylum."\n"; + require "headread"; open(IF, ">tmp_index"); @@ -13,7 +15,7 @@ open(IF, ">tmp_index"); while ($testfile = <*.c>) { &readheader($testfile, 0); $testnum=$testfile; - $testnum=~s/.c//; + $testnum=~s/\.c//; $testname = $test_header{"summary"}; unless ($testname) { print "unknown test: ".$testnum."\n"; @@ -23,6 +25,12 @@ while ($testfile = <*.c>) { } close(IF); -system("sort -n tmp_index"); +if ($platform_phylum eq "unix") { + $sort_options = "-n"; +} elsif ($platform_phylum eq "pc") { + $sort_options = "<"; # there's no numeric sort option, unfortunately +} + +system("sort $sort_options tmp_index"); system("rm tmp_index");