Michael Tokarev <m...@tls.msk.ru> writes:
-#!/bin/bash
+#!/usr/bin/env bash
What's the reason for this indirection? bash has been /bin/bash
for decades,
it is used this way in many other places in qemu code and in
other projects.
Yes I know about current move /bin => /usr/bin etc, but the
thing is that
traditional paths like this one (or like /bin/sh) is not going
away any time
soon. What's the matter here?
In addition to Stefan's answer, some modern systems use a per-user
file system hierarchy where each user (or even each environment
development for a user) gets a global set of directories with
only the applications they want. This is done either through
adding each application directory into the user PATH or by using a
set of user-specific bin/lib/... directories full of symlinks to
the chosen applications.
In those environments, /usr/bin might only contain "env", such as
"/usr/bin/env application" works. This is the case for example on
NixOS, which is more and more used in research environments for
their easily reproducible build environments.
Sam
--
Samuel Tardieu
Télécom Paris - Institut Polytechnique de Paris