the shebang used by tcc documentation and
examples hardcodes the path to tcc like so:

```
#!/usr/local/bin/tcc -run
```

env (/usr/bin/env) can be used to allow for running tcc
regardless of where it is installed, as long as its on $PATH:

```
#!/usr/bin/env -S tcc -run
```

env -S will parse its argument into multiple arguments for you
<https://www.man7.org/linux/man-pages/man1/env.1.html#SCRIPT_OPTION_HANDLING>


tcc offers a hack workaround for passing arguments in shebangs

```
#!/usr/local/bin/tcc -run -L/usr/X11R6/lib -lX11
```

but with env -S this becomes unnecessary, since

```
#!/usr/bin/env -S tcc -L/usr/X11R6/lib -lX11 -run
```

will correctly invoke "tcc" with the arguments
"-L/usr/X11R6/lib", "-lX11", and "-run"


could the documentation and examples be changed to use /usr/bin/env?

_______________________________________________
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to