comparison index.cgi.pl @ 6:5b8f7c3dd929

fix sort python versions index.cgi.pl
author Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
date Tue, 07 May 2019 08:55:23 +0900
parents 46d936853422
children
comparison
equal deleted inserted replaced
5:46d936853422 6:5b8f7c3dd929
1 #!/usr/bin/env perl 1 #!/usr/bin/env perl
2 use strict; 2 use strict;
3 use warnings; 3 use warnings;
4 4
5 my ($tartget_hg_version,) = map{ m|/usr/local/Cellar/mercurial/(.*)|; $1} glob "/usr/local/Cellar/mercurial/*"; 5 my ($tartget_hg_version,) = sort { $b <=> $a } map{ m|/usr/local/Cellar/mercurial/(.*)|; $1} glob "/usr/local/Cellar/mercurial/*";
6 6
7 while (my $line = <DATA>){ 7 while (my $line = <DATA>){
8 if ($line =~ /^(?!#)sys\.path\.insert/) { 8 if ($line =~ /^(?!#)sys\.path\.insert/) {
9 $line =~ s[(mercurial/)(\d+\.?\d+?)(/lib)][$1${tartget_hg_version}$3]; 9 $line =~ s[(mercurial/)(\d+\.?\d+?)(/lib)][$1${tartget_hg_version}$3];
10 } 10 }