Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Use env to find script interpreters
authorGabriel Corona <gabriel.corona@loria.fr>
Mon, 7 Sep 2015 12:51:47 +0000 (14:51 +0200)
committerGabriel Corona <gabriel.corona@loria.fr>
Mon, 7 Sep 2015 12:51:47 +0000 (14:51 +0200)
Sometimes, there is no /usr/bin/perl.

25 files changed:
contrib/deployment_generation/generate_random_deployment.pl
contrib/network_model/regression2.py
examples/java/bittorrent/generate.py
examples/msg/bittorrent/generate.py
examples/msg/chord/generate.py
examples/msg/kademlia/generate.py
examples/platforms/conf/transform_optorsim_platform.pl
examples/platforms/generation_scripts/generate_g5k_platform.pl
examples/platforms/generation_scripts/generate_g5k_platform_cabinets.pl
examples/platforms/syscoord/generate_peer_platform.pl
src/smpi/fixsrc.pl
tools/MSG_visualization/colorize.pl
tools/MSG_visualization/trace2fig.pl
tools/cmake/Scripts/generate_memcheck_tests.pl
tools/cmake/Scripts/my_valgrind.pl
tools/cmake/Scripts/update_tesh.pl
tools/doxygen/index_create.pl
tools/doxygen/xbt_log_extract_hierarchy.pl
tools/internal/generate-multi-jar.py
tools/internal/spell_comments.pl
tools/normalize-pointers.py
tools/stack-cleaner/as
tools/stack-cleaner/clean-stack-filter
tools/stack-cleaner/compiler-wrapper
tools/tesh/colorize.pl

index b160b3f..bd353fa 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
 
 # Copyright (c) 2009, 2011, 2014. The SimGrid Team.
 # All rights reserved.
@@ -7,6 +7,7 @@
 # under the terms of the license (GNU LGPL) which comes with this package.
 
 use strict;
+use warnings;
 
 sub melange {
     my $tableau=shift;
index f314d9e..fc4e84b 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 
 # Copyright (c) 2011, 2014. The SimGrid Team.
 # All rights reserved.
index d4ea09e..155957f 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 
 # Copyright (c) 2013-2014. The SimGrid Team.
 # All rights reserved.
index f3460bb..7f0d6d4 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 
 # Copyright (c) 2012, 2014. The SimGrid Team.
 # All rights reserved.
index afc0ea9..3b707ac 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 
 # Copyright (c) 2011-2012, 2014. The SimGrid Team.
 # All rights reserved.
index b475120..1b9526c 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 
 # Copyright (c) 2012, 2014. The SimGrid Team.
 # All rights reserved.
index 7e5369a..d2db4d9 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
 
 # Copyright (c) 2011, 2014. The SimGrid Team.
 # All rights reserved.
@@ -7,6 +7,7 @@
 # under the terms of the license (GNU LGPL) which comes with this package.
 
 use strict;
+use warnings;
 
 if($#ARGV!=0) {
     die "Usage: perl transfrom_optorsim_platform.pl <file.conf>\n";
index 023ffac..048143f 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
 
 # Copyright (c) 2011, 2014. The SimGrid Team.
 # All rights reserved.
@@ -7,6 +7,7 @@
 # under the terms of the license (GNU LGPL) which comes with this package.
 
 use strict;
+use warnings;
 use Switch;
 my $toversion=3;
 
index 2205650..9f3818e 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
 
 # Copyright (c) 2011, 2014. The SimGrid Team.
 # All rights reserved.
@@ -7,6 +7,7 @@
 # under the terms of the license (GNU LGPL) which comes with this package.
 
 use strict;
+use warnings;
 use Switch;
 
 my $site="";
index a01bceb..7b530e3 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
 
 # Copyright (c) 2011, 2014. The SimGrid Team.
 # All rights reserved.
@@ -7,6 +7,7 @@
 # under the terms of the license (GNU LGPL) which comes with this package.
 
 use strict;
+use warnings;
 
 my $toversion=3;
 my $nb_peer = $ARGV[0];
index 2bc55d9..8844d20 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 
 # Copyright (c) 2011, 2014. The SimGrid Team.
 # All rights reserved.
index b3c5671..db2676b 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 
 # Copyright (c) 2005, 2007, 2010, 2014. The SimGrid Team.
 # All rights reserved.
index cd23d39..2ac7c85 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
 
 # Copyright (c) 2006-2007, 2014. The SimGrid Team.
 # All rights reserved.
@@ -7,6 +7,8 @@
 # under the terms of the license (GNU LGPL) which comes with this package.
 
 use strict;
+use warnings;
+
 #use Data::Dumper;
 use XFig;
 use POSIX;
index fc4fd61..d37977a 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
 
 # Copyright (c) 2012-2014. The SimGrid Team.
 # All rights reserved.
@@ -7,6 +7,7 @@
 # under the terms of the license (GNU LGPL) which comes with this package.
 
 use strict;
+use warnings;
 
 # input file = AddTest.txt
 
index 073b4b8..3b273d5 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
 
 # Copyright (c) 2012-2014. The SimGrid Team.
 # All rights reserved.
@@ -7,6 +7,8 @@
 # under the terms of the license (GNU LGPL) which comes with this package.
 
 use strict;
+use warnings;
+
 my @argv = ("valgrind");
 my $count = 0;
 
index 7c340b4..5e0a06d 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
 
 # Copyright (c) 2012, 2014. The SimGrid Team.
 # All rights reserved.
@@ -7,6 +7,7 @@
 # under the terms of the license (GNU LGPL) which comes with this package.
 
 use strict;
+use warnings;
 
 if($#ARGV!=1) {
     die "Usage: perl make_tesh.pl <directory> <old.tesh>\n";
index f9f58d2..7d23af0 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
 
 # Copyright (c) 2005, 2012-2014. The SimGrid Team.
 # All rights reserved.
@@ -6,6 +6,8 @@
 # This program is free software; you can redistribute it and/or modify it
 # under the terms of the license (GNU LGPL) which comes with this package.
 
+use warnings;
+
 ($#ARGV >= 1) or die "Usage: index_create.pl <input-tag-file> <output-doc-file>";
 
 my($type) = "";
index 40f60ee..ba13f8a 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 
 # Copyright (c) 2008, 2010, 2012-2014. The SimGrid Team.
 # All rights reserved.
index c200c49..41ec224 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 
 # Copyright (c) 2013-2014. The SimGrid Team.
 # All rights reserved.
index 5ab5958..7ff91da 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 
 # Copyright (c) 2013-2015. The SimGrid Team.
 # All rights reserved.
@@ -13,6 +13,7 @@
 # Copyright 2003, Dan Kegel.  Licensed under GPL.  See the file ../COPYING for details.
 
 use strict;
+use warnings;
 
 die "Please install iamerican to use that script." 
   unless (-r "/usr/lib/ispell/american.hash");
index 04049fa..ba78a80 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 
 # Copyright (c) 2013-2014. The SimGrid Team.
 # All rights reserved.
index 1a66dd3..46446cb 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/ruby
+#!/usr/bin/env ruby
 # Wrapper around the real `as` which adds filtering capabilities.
 
 require "tempfile"
index a2f91aa..64e7990 100755 (executable)
@@ -1,9 +1,10 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
 # Transform assembly in order to clean each stack frame for X86_64.
 
 use strict;
-$SIG{__WARN__} = sub { die @_ };
+use warnings;
 
+$SIG{__WARN__} = sub { die @_ };
 
 # Whether we are still scanning the content of a function:
 our $scanproc = 0;
index 8b8a62f..62504af 100755 (executable)
@@ -1,7 +1,9 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
 # Compiler wrapper with stack-cleaner support (enabled by default).
 # Usage: ./compiler-wrapper target-compiler args [-f[no-]stack-cleaner]
 
+use warnings;
+
 use File::Basename;
 
 my $compiler = shift(@ARGV);
index 9cc8d18..88b1f55 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
 
 # Copyright (c) 2010, 2014. The SimGrid Team.
 # All rights reserved.
@@ -6,6 +6,8 @@
 # This program is free software; you can redistribute it and/or modify it
 # under the terms of the license (GNU LGPL) which comes with this package.
 
+use warnings;
+
 use Term::ANSIColor qw{:constants};
 $Term::ANSIColor::AUTORESET = 1;