Closed kevinmatthes closed 3 years ago
I just adjusted the shebang and tested it on Debian 10 (just the execution of bootstrap.sh
). The script still works properly (the output is the same as before). If the change should cause problems on other OS, please leave an according comment here.
I referenced to README instead of the tutorial, which is not anymore in the git repository.
I took a look at
bootstrap.sh
and noticed two points which may be adjusted in order improve it.(1)
Line 22--24: there is no such tutorial indoc/tutorial
, yet.(2)
The shebang is not as general enough. This might lead to problems during the build process.These problems are in detail as follows:
bootstrap.sh
and try to search the named tutorial. Since it does not exist, yet, this can lead to questions, how to build the library without the shell script. Furthermore, some users could be disappointed when they relied on the existence of the tutorial.I would like to suggest the following options in order to fix these problems:
#!/usr/bin/env bash
. When using Python 3, for instance, developers should definitely name the intended interpreter since there are still some Linux distributions which still support Python 2 -- although this support is supposed to end within the next years. In order to avoid problems because of version specific features, the interpreter should be defined clearly. Since one cannot rely on the same installation path on other machines, it is quite common to define it as#!/usr/bin/env python3
since this variable,env
, stores the information about which Python 3 interpreter is set as default one. This semantic works with Bash, as well, although most machines offer a Bash installation in/bin/bash
. This is just an enhancement in order to avoid unnecessary errors on machines where the default installation path differs.Furthermore, the latter point,
(2)
, also concerns theconfigure
script, as well, which is created during the execution ofbootstrap.sh
. Here, the shebang#! /bin/sh
is even more problematic, as it contains an additional space character, for example. Hence, some IDEs consider it completely faulty (919 errors, 81 warnings, 130 suppressed further errors and warnings in VSCodium, for instance). Since thebootstrap.sh
already requires Bash in order to createconfigure
, the shebang should be changed to#!/usr/bin/env bash
, as well. We should think about redesigning it in order to avoid this unintended behaviour of IDEs when viewing this temporary file, but this should be rather discussed in a separate issue, I suppose.What do you think about these two points?