[Mesa-dev] [PATCH] Convert git_sha1_gen script to Python.
Emil Velikov
emil.l.velikov at gmail.com
Tue Aug 1 15:07:15 UTC 2017
On 1 August 2017 at 15:37, Jose Fonseca <jfonseca at vmware.com> wrote:
> On 01/08/17 15:32, Emil Velikov wrote:
>>
>> On 1 August 2017 at 14:38, Jose Fonseca <jfonseca at vmware.com> wrote:
>>>
>>> Python is the scripting language we've been using for scripts that need
>>> to run across all supported platforms.
>>>
>>> Shell is *not* a portable language for scripts.
>>
>>
>> Guessing that you've hit some issues on Windows?
>
>
> Yep. While it's possible to find sh implementations on Windows all suffer
> from many issues. It's better to stay away from them.
>
Ack. I was fortunate enough in my very limited experience.
>>> --- /dev/null
>>> +++ b/bin/git_sha1_gen.py
>>> @@ -0,0 +1,20 @@
>>> +#!/usr/bin/env python
>>
>> Script is already invoked manually via $python.
>> Please drop the execute bit alongside the shbang line.
>
>
> The shell script was also invoked by `sh` and still had the shbang line.
>
My bad - we should have invoked the script directly.
> I don't see the harm of the shbang line. By the contrary, it's convenient.
>
On the python topic - I've seen it fuel some discussions... amongst others:
Python tends to be a symlink it to python2 or python3 depending on distro.
Anyway - as-is script works like a charm here.
R-b still stands, regardless of the shbang suggestion.
-Emil
More information about the mesa-dev
mailing list