which(1) is not standardized by POSIX, and has different implementations
and behaviour on different distributions. The behaviour and exit status
of command -v is standardized by POSIX, and in particular, checking its
exit status is an appropriate way to ask: if I called this command,
would it be found?
Signed-off-by: Simon McVittie <smcv@collabora.com>
In the unlikely event that one of these paths contains spaces or other
special characters, we don't want to field splitting to take place.
Signed-off-by: Simon McVittie <smcv@collabora.com>
This changes the application prefix to /app, which has the
advantage of being the same length as /usr. This may help
making some packages relocatable.
We make /self a symlink to /app for now, to keep existing images
work, but at some point we will probably remove this.