[libvirt] [ocaml PATCH 3/3] Fix shebang in perl scripts

Richard W.M. Jones rjones at redhat.com
Tue Aug 20 14:13:35 UTC 2019


On Tue, Aug 20, 2019 at 03:44:56PM +0200, Pino Toscano wrote:
> Instead of hardcoding the location of perl (assuming it is installed in
> /usr), use /usr/bin/env to run it, and thus picking it from $PATH.
> This makes it possible to run these scripts also on installations with
> perl in a different prefix than /usr.
> 
> Also, given that we want enable warnings on scripts, turn the -w
> previously in shebang to explicit "use warnings;" in scripts which
> didn't have it before.
> 
> Signed-off-by: Pino Toscano <ptoscano at redhat.com>
> ---
>  libvirt/generator.pl | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/libvirt/generator.pl b/libvirt/generator.pl
> index 490ef9a..e850500 100755
> --- a/libvirt/generator.pl
> +++ b/libvirt/generator.pl
> @@ -1,4 +1,4 @@
> -#!/usr/bin/perl -w
> +#!/usr/bin/env perl
>  #
>  # OCaml bindings for libvirt.
>  # (C) Copyright 2007-2015 Richard W.M. Jones, Red Hat Inc.
> @@ -26,6 +26,7 @@
>  # Please read libvirt/README.
>  
>  use strict;
> +use warnings;

All seems very straightforward, ACK series.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
Fedora Windows cross-compiler. Compile Windows programs, test, and
build Windows installers. Over 100 libraries supported.
http://fedoraproject.org/wiki/MinGW




More information about the libvir-list mailing list