From 366e2438f6c8efaf1d04867ac7a8241198167f55 Mon Sep 17 00:00:00 2001 From: Augustin Degomme Date: Thu, 26 Sep 2013 19:19:13 +0200 Subject: [PATCH] better OS detection --- buildtools/Cmake/Scripts/tesh.pl | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/buildtools/Cmake/Scripts/tesh.pl b/buildtools/Cmake/Scripts/tesh.pl index aef4938ff3..cbdc724554 100755 --- a/buildtools/Cmake/Scripts/tesh.pl +++ b/buildtools/Cmake/Scripts/tesh.pl @@ -16,6 +16,7 @@ B [I] I 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"; } -- 2.20.1