fbrosson | 533407a | 2018-04-04 21:44:29 +0000 | [diff] [blame] | 1 | #!/usr/bin/env perl |
Gilles Peskine | bf359c7 | 2019-07-27 23:56:04 +0200 | [diff] [blame] | 2 | # Backward compatibility redirection |
Gilles Peskine | 0409bcd | 2019-09-13 15:14:42 +0200 | [diff] [blame] | 3 | |
Bence Szépkúti | 1e14827 | 2020-08-07 13:07:28 +0200 | [diff] [blame] | 4 | ## Copyright The Mbed TLS Contributors |
Gilles Peskine | 0409bcd | 2019-09-13 15:14:42 +0200 | [diff] [blame] | 5 | ## SPDX-License-Identifier: Apache-2.0 |
| 6 | ## |
| 7 | ## Licensed under the Apache License, Version 2.0 (the "License"); you may |
| 8 | ## not use this file except in compliance with the License. |
| 9 | ## You may obtain a copy of the License at |
| 10 | ## |
| 11 | ## http://www.apache.org/licenses/LICENSE-2.0 |
| 12 | ## |
| 13 | ## Unless required by applicable law or agreed to in writing, software |
| 14 | ## distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 15 | ## WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 16 | ## See the License for the specific language governing permissions and |
| 17 | ## limitations under the License. |
Gilles Peskine | 0409bcd | 2019-09-13 15:14:42 +0200 | [diff] [blame] | 18 | |
Gilles Peskine | bf359c7 | 2019-07-27 23:56:04 +0200 | [diff] [blame] | 19 | my $py = $0; |
Gilles Peskine | df78e49 | 2019-11-26 13:30:00 +0100 | [diff] [blame] | 20 | $py =~ s/\.pl$/.py/ or die "Unable to determine the name of the Python script"; |
Gilles Peskine | 6cf3127 | 2019-07-29 23:42:50 +0200 | [diff] [blame] | 21 | exec 'python3', $py, @ARGV; |
Gilles Peskine | 987e271 | 2019-11-26 13:30:16 +0100 | [diff] [blame] | 22 | print STDERR "$0: python3: $!. Trying python instead.\n"; |
Gilles Peskine | a103c18 | 2019-09-05 20:29:22 +0200 | [diff] [blame] | 23 | exec 'python', $py, @ARGV; |
| 24 | print STDERR "$0: python: $!\n"; |
Gilles Peskine | 6cf3127 | 2019-07-29 23:42:50 +0200 | [diff] [blame] | 25 | exit 127; |