Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
better OS detection
authorAugustin Degomme <degomme@idpann.imag.fr>
Thu, 26 Sep 2013 17:19:13 +0000 (19:19 +0200)
committerAugustin Degomme <degomme@idpann.imag.fr>
Thu, 26 Sep 2013 17:19:13 +0000 (19:19 +0200)
buildtools/Cmake/Scripts/tesh.pl

index aef4938..cbdc724 100755 (executable)
@@ -16,6 +16,7 @@ B<tesh> [I<options>] I<tesh_file>
 my($bindir)=".";
 my($srcdir)=".";
 my $path = $0;
+my $OS;
 $path =~ s|[^/]*$||;
 push @INC,$path;
 
@@ -24,12 +25,10 @@ use strict;
 use Term::ANSIColor;
 use IPC::Open3;
 
-my($OS)=`echo %OS%`;
-if($OS eq "%OS%\n"){
+if($^O eq "linux"){
        $OS = "UNIX";
 }
 else{
-    print("$OS and %OS%\n");
        $OS = "WIN";
 }