1--- a/gfal-SCRIPT_NAME 2022-11-17 00:00:00.000000000 +0000
2+++ b/gfal-SCRIPT_NAME 2022-11-17 00:00:00.000000000 +0000
3@@ -1,4 +1,4 @@
4-#!/bin/sh
5+#!/usr/bin/env python3
6 # -*- coding: utf-8 -*-
7 #
8 # Copyright (c) 2022 CERN
9@@ -15,10 +15,2 @@
10 # See the License for the specific language governing permissions and
11 # limitations under the License.
12-
13-# Execute script content with first python interpreter found:
14-# * GFAL_PYTHONBIN environment variable
15-# * python on the PATH if import gfal2, gfal2_util succeeds
16-# * python3 on the PATH if import gfal2, gfal2_util succeeds
17-# * python2 on the PATH if import gfal2, gfal2_util succeeds
18-# * /usr/bin/python
19-"exec" "$( check_interpreter() { unalias $1 2> /dev/null; unset $1; GFAL_PYTHONBIN=$(command -v $1); [ $GFAL_PYTHONBIN ] && $GFAL_PYTHONBIN -c 'import gfal2, gfal2_util' > /dev/null 2>&1 && { echo $GFAL_PYTHONBIN; unset GFAL_PYTHONBIN; }; }; [ $GFAL_PYTHONBIN ] && echo $GFAL_PYTHONBIN || check_interpreter python || check_interpreter python3 || check_interpreter python2 || echo /usr/bin/python )" "-u" "-Wignore" "$0" "$@"