tweewide: Fix most Shebang lines
authorFinn Behrens <me@kloenk.de>
Mon, 23 Nov 2020 14:15:33 +0000 (15:15 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Jun 2021 06:23:27 +0000 (08:23 +0200)
commit c25ce589dca10d64dde139ae093abc258a32869c upstream.

Change every shebang which does not need an argument to use /usr/bin/env.
This is needed as not every distro has everything under /usr/bin,
sometimes not even bash.

Signed-off-by: Finn Behrens <me@kloenk.de>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
[nicolas@fjasle.eu: update contexts for v4.9, adapt for old scripts]
Signed-off-by: Nicolas Schier <nicolas@fjasle.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
27 files changed:
Documentation/sphinx/parse-headers.pl
Documentation/target/tcm_mod_builder.py
Documentation/trace/postprocess/decode_msr.py
Documentation/trace/postprocess/trace-pagealloc-postprocess.pl
Documentation/trace/postprocess/trace-vmscan-postprocess.pl
arch/ia64/scripts/unwcheck.py
scripts/analyze_suspend.py
scripts/bloat-o-meter
scripts/bootgraph.pl
scripts/checkincludes.pl
scripts/checkstack.pl
scripts/config
scripts/diffconfig
scripts/dtc/dt_to_config
scripts/extract_xc3028.pl
scripts/get_dvb_firmware
scripts/markup_oops.pl
scripts/profile2linkerlist.pl
scripts/show_delta
scripts/stackdelta
scripts/tracing/draw_functrace.py
tools/kvm/kvm_stat/kvm_stat
tools/perf/python/tracepoint.py
tools/perf/python/twatch.py
tools/perf/scripts/python/sched-migration.py
tools/perf/util/setup.py
tools/testing/ktest/compare-ktest-sample.pl

index db0186a7618f2a9ca9b712db1c9a40d4bb6e3d7c..299b0f82af27f82625df5f02bc210dc57c48322e 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 use strict;
 use Text::Tabs;
 
index 94bf6944bb1e412b85f649aab136155052092e29..7e79ff6b09e0e32b80fcbba10498177d32752b7c 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 # The TCM v4 multi-protocol fabric module generation script for drivers/target/$NEW_MOD
 #
 # Copyright (c) 2010 Rising Tide Systems
index 0ab40e0db5809921a395e18ca23e0cfe2823a280..aa9cc7abd5c2bec913eca3e76d0ea2f7b0079519 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 # add symbolic names to read_msr / write_msr in trace
 # decode_msr msr-index.h < trace
 import sys
index 0a120aae33ce5c9836dad948b18736ea183e6801..b9b7d80c2f9d2d5afc09e5b40d6ab44370c6e45c 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 # This is a POC (proof of concept or piece of crap, take your pick) for reading the
 # text representation of trace output related to page allocation. It makes an attempt
 # to extract some high-level information on what is going on. The accuracy of the parser
index 8f961ef2b4577d4b7485e84bd379dc5ebd022f47..7749cdf372f76fa699bae77315df50278d7b1ac0 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 # This is a POC for reading the text representation of trace output related to
 # page reclaim. It makes an attempt to extract some high-level information on
 # what is going on. The accuracy of the parser may vary
index 2bfd941ff7c7cdb5a96622875e5d7507125623b3..c27849889e193f4d3a8479b5e5db470cccc2493d 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 #
 # Usage: unwcheck.py FILE
 #
index a0ba48fa2c5eaa6d1c883dde91e0223676b4d135..edc4f1255f9bacd6cc3e523422ecb6df84566672 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 #
 # Tool for analyzing suspend/resume timing
 # Copyright (c) 2013, Intel Corporation.
index d9ff038c1b28400799462dad5e29335b092b9a1a..08e607e829c0101c637aa19a91d5cfc77bbc75f6 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 #
 # Copyright 2004 Matt Mackall <mpm@selenic.com>
 #
index 9ca667bcaee95024750d8fdc4febad2f8d5f6d76..594c55541b1623aacb78eb986356f14383502157 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 
 # Copyright 2008, Intel Corporation
 #
index 97b2c6143fe4f9d61cbc181b316e812e82dc456e..cfdfa02d4d923b04acf21c9614995e62bdafe769 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 #
 # checkincludes: find/remove files included more than once
 #
index b8f61654527712975db76d2d0357121a67a49e41..32828fafcf5b12e93504c000ae73a90f374e436b 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 
 #      Check the stack usage of functions
 #
index 73de17d396987098ddab8fadcffc2ec81a7d8ebc..06ac9882e1de20ea63966f103e9d01b5b2914f6e 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 # Manipulate options in a .config file from the command line
 
 myname=${0##*/}
index 0db267d0adc9231de508b4cf9ca7068df8362384..ad1b16ec0f5bd4bd057a56f3d2d921327d1bf63f 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 #
 # diffconfig - a tool to compare .config files.
 #
index 9a248b505c58572e8012808fba6d5b4bdf494c85..5dfd1bff351f764e3c686df7edb6f6661203f59f 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 
 # Copyright 2016 by Frank Rowand
 # Copyright 2016 by Gaurav Minocha
index 47877deae6d7f60fe790bb4873df8f649162b691..61d9b256c6581b34f269a5a8dbf880ade359503f 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 
 # Copyright (c) Mauro Carvalho Chehab <mchehab@infradead.org>
 # Released under GPLv2
index 1a0a04125f713cb586549e1f5315501447eb65de..f3f230225aba0ab955e315573dd8866eafcbe54e 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 #     DVB firmware extractor
 #
 #     (c) 2004 Andrew de Quincey
index c21d16328d3f2bae0ccaba40029a7e1f83229b6a..70dcfb6b3de1cb4d2a8e4093f0513ed4fafb0250 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 
 use File::Basename;
 use Math::BigInt;
index 6943fa7cc95b646d9f1a10752cf2577f4b1a2185..f23d7be943948df09dd037b9679c9cf0de5c6873 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 
 #
 # Takes a (sorted) output of readprofile and turns it into a list suitable for
index 5b365009e6a398bed2aa9c13b575bf651aff21eb..55c66dce6fc170276c2328c176b4f681510064b0 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 #
 # show_deltas: Read list of printk messages instrumented with
 # time data, and format with time deltas.
index 48eabf2f48f85212bd5202c40ca6eab530b285a3..20a79f19a111d7ad319c91c3f53d105524530619 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 
 # Read two files produced by the stackusage script, and show the
 # delta between them.
index db40fa04cd513f4a68d86af935fec02f27e507d2..30f117dfab43876d40bf8176805b0aa3d0d2d945 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 
 """
 Copyright 2008 (c) Frederic Weisbecker <fweisbec@gmail.com>
index 581278c5848877ea1a90cfdbf8045afd23298c0c..5e5797cc375721c539dd944c751f68845fcc86a5 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 #
 # top-like utility for displaying kvm statistics
 #
index eb4dbed57de7ea15a243a22be175d6716a97ec75..ce273c8b512b0bc0117d5b678deef54feff8195c 100755 (executable)
@@ -1,4 +1,4 @@
-#! /usr/bin/python
+#! /usr/bin/env python
 # -*- python -*-
 # -*- coding: utf-8 -*-
 
index c235c22b107ab5531d3f03de1f328f5fc2758a4c..5a55b25f0b8c37f9bb2ba9ced1d6b20c896078df 100755 (executable)
@@ -1,4 +1,4 @@
-#! /usr/bin/python
+#! /usr/bin/env python
 # -*- python -*-
 # -*- coding: utf-8 -*-
 #   twatch - Experimental use of the perf python interface
index de66cb3b72c9e6be9dc5d884611e0522def92631..dd3e7ae2a1af3ace967bf6b9fdb68ad915823e90 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 #
 # Cpu task migration overview toy
 #
index c8680984d2d6680f56a974a1b54056a5e74263e1..163f38fbd79c042bdde706f70afd83afca67f560 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/python2
+#!/usr/bin/env python2
 
 from distutils.core import setup, Extension
 from os import getenv
index a373a5bfff683cc4b395588af358a2aa92b2171d..c488e863d83f1f2ed62d41b01277f3f6fea08055 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 
 open (IN,"ktest.pl");
 while (<IN>) {