2019-11-05 21:28:46 +00:00
|
|
|
From 8a54316a15c76154d307ba53be5d98b8503a5d5f Mon Sep 17 00:00:00 2001
|
2019-05-07 13:39:17 +00:00
|
|
|
From: Honggang Li <honli@redhat.com>
|
2019-11-05 21:28:46 +00:00
|
|
|
Date: Thu, 13 Jun 2019 20:58:50 -0400
|
2019-05-07 13:39:17 +00:00
|
|
|
Subject: [PATCH] Fix shebang for python scripts
|
|
|
|
|
|
|
|
rhel-8 does not support python2. User '#!/usr/bin/python3' for all
|
|
|
|
python scripts which with a shebang.
|
|
|
|
|
|
|
|
The substitution was done with following bash script.
|
|
|
|
|
|
|
|
====
|
|
|
|
|
|
|
|
pys=$(find . -type f -name '*.py')
|
|
|
|
|
|
|
|
for f in $pys; do
|
2019-11-05 21:28:46 +00:00
|
|
|
sed -ne '1p' $f | grep -q -E '^#!/usr/bin'
|
|
|
|
if [ $? -eq 0 ]; then
|
|
|
|
echo $f
|
|
|
|
sed -e '/^#!\/usr\/bin/d' -i $f
|
|
|
|
sed -e '1 i\#!/usr/bin/python3' -i $f
|
|
|
|
fi
|
2019-05-07 13:39:17 +00:00
|
|
|
done
|
|
|
|
===
|
|
|
|
|
|
|
|
Signed-off-by: Honggang Li <honli@redhat.com>
|
|
|
|
---
|
2019-11-05 21:28:46 +00:00
|
|
|
tracers/fwtrace/mstfwtrace.py | 2 +-
|
|
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
2019-05-07 13:39:17 +00:00
|
|
|
|
2019-11-05 21:28:46 +00:00
|
|
|
diff --git a/tracers/fwtrace/mstfwtrace.py b/tracers/fwtrace/mstfwtrace.py
|
|
|
|
index 3c3ef8f..5193a31 100755
|
|
|
|
--- a/tracers/fwtrace/mstfwtrace.py
|
|
|
|
+++ b/tracers/fwtrace/mstfwtrace.py
|
2019-05-07 13:39:17 +00:00
|
|
|
@@ -1,4 +1,4 @@
|
|
|
|
-#!/usr/bin/env python
|
|
|
|
+#!/usr/bin/python3
|
2019-11-05 21:28:46 +00:00
|
|
|
# --
|
|
|
|
#
|
|
|
|
# Copyright (C) 2019 Mellanox Technologies Ltd. All rights reserved.
|
2019-05-07 13:39:17 +00:00
|
|
|
--
|
|
|
|
2.20.1
|
|
|
|
|