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:36:11 +0000 (08:36 +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.14, adapt for old scripts]
Signed-off-by: Nicolas Schier <nicolas@fjasle.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
24 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/bloat-o-meter
scripts/config
scripts/diffconfig
scripts/show_delta
scripts/sphinx-pre-install
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/call-graph-from-sql.py
tools/perf/scripts/python/sched-migration.py
tools/perf/tests/attr.py
tools/perf/util/setup.py
tools/power/pm-graph/analyze_boot.py
tools/power/pm-graph/analyze_suspend.py
tools/power/x86/intel_pstate_tracer/intel_pstate_tracer.py
tools/testing/ktest/compare-ktest-sample.pl
tools/testing/selftests/tc-testing/tdc_batch.py

index a958d8b5e99da34b898a1a81b47d818a09c557b6..35a2e5f2ef27ef1f016549e80745bef0381e96f3 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 use strict;
 use Text::Tabs;
 use Getopt::Long;
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 ba976805853a546436655269c5a9cc29b6e070ce..c9b8b35468c3b0e8637a0bc2b066055bb4210c64 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 89f3a1480a637ffcf8b51ff64ddd1c7dd8e1aa46..cfc02cb3931d81ac2897be98b6b96dd484e78ee4 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 # SPDX-License-Identifier: GPL-2.0
 #
 # Usage: unwcheck.py FILE
index a27677146410193703234ab9590525584220ecd3..654cce5614d86a5b2a48d92f03dcb7280f4b6b8d 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 #
 # Copyright 2004 Matt Mackall <mpm@selenic.com>
 #
index eee5b7f3a092ae4ac46bcdf92ffe8bb3c643aafd..8c8d7c3d7accc77b31ea6e5f0e4749c35a2524d3 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 # SPDX-License-Identifier: GPL-2.0
 # Manipulate options in a .config file from the command line
 
index 89abf777f1973a23a539209c6b151c5fdc9e4e12..627eba5849b5ccf6a018cb1be1fd27341807fb62 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 # SPDX-License-Identifier: GPL-2.0
 #
 # diffconfig - a tool to compare .config files.
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 3524dbc313163e70d05a5bda0b0a31d41668502d..acc185047805eb96f0903dc451d685c37132954d 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 use strict;
 
 # Copyright (c) 2017 Mauro Carvalho Chehab <mchehab@kernel.org>
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 fb02aa4591eb3fb52b374aad54b60c81f04d89a9..5a1c92afdb0161494a95b320b90296c3c434354c 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 #
 # top-like utility for displaying kvm statistics
 #
index eb76f6516247e136f0277ea659f07317d3e11fbc..461848c7f57dca3dc7e61f0df5153309d97a4419 100755 (executable)
@@ -1,4 +1,4 @@
-#! /usr/bin/python
+#! /usr/bin/env python
 # SPDX-License-Identifier: GPL-2.0
 # -*- 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 b494a67a1c679ec2e6cd89105ce09702ee76146f..40eb659023f6a71e2834a30787be382cc66121a8 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/python2
+#!/usr/bin/env python2
 # call-graph-from-sql.py: create call-graph from sql database
 # Copyright (c) 2014-2017, Intel Corporation.
 #
index de66cb3b72c9e6be9dc5d884611e0522def92631..dd3e7ae2a1af3ace967bf6b9fdb68ad915823e90 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 #
 # Cpu task migration overview toy
 #
index 44090a9a19f3b9f33b0ae8eee972941a919fca4c..6c68435585c7815b5342d89b961039991c13f8fc 100644 (file)
@@ -1,4 +1,4 @@
-#! /usr/bin/python
+#! /usr/bin/env python
 # SPDX-License-Identifier: GPL-2.0
 
 import os
index 23f1bf1751797fe02cdeb47fa90825b0b13fbac5..393e7a1451f6e0de319ec4b51077391340299a19 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/python2
+#!/usr/bin/env python2
 
 from os import getenv
 
index e83df141a59765b2db300ffd1cc0066a329f00f0..4cb5d5aab9112dc7a924abd3534d6f9b1059ebd0 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 #
 # Tool for analyzing boot timing
 # Copyright (c) 2013, Intel Corporation.
index 1b60fe2037414c93018dd1a5075e794fc2c38e1f..d9c467bf8588f81da172a91b3f26148e7467aa1e 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 98c9f2df8aa71f4d6687a4da4c89157595578fd4..84862a1842d6cc86500ec41ddfff961eddbda71f 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 # -*- coding: utf-8 -*-
 #
 """ This utility can be used to debug and tune the performance of the
index 4118eb4a842d2ec0af5410b319c9734ce74b3457..ebea21d0a1be8b1a63d645561aa86c66e7212c10 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 # SPDX-License-Identifier: GPL-2.0
 
 open (IN,"ktest.pl");
index 707c6bfef689947e1bd3832db9ab420286dbb59c..174646b141174e3c4d8ca26a74989a928637bf71 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python3
+#!/usr/bin/env python3
 
 """
 tdc_batch.py - a script to generate TC batch file