[haiku-development] Re: RFC: /usr symlink?

  • From: Donn Cave <donn@xxxxxxxxxxx>
  • To: "haiku-development@xxxxxxxxxxxxx" <haiku-development@xxxxxxxxxxxxx>
  • Date: Fri, 11 Oct 2013 17:43:58 -0700 (PDT)

Quoth John Scipione <jscipione@xxxxxxxxx>,

> As the linked answer indicates, both #!/usr/bin/python and
> #!/usr/bin/env python are valid in different cases, at least on *nix
> systems. If we would like to have cross-platform scrips work on Haiku
> then we should revert the runtime_loader code and simply add a symlink
> from /usr/ to /boot/system/.

But ... would there be a /boot/system/bin/python on Haiku anyway?
I haven't been keeping track of current trends in Haiku directory
layout, but traditionally I would look for it in /boot/common/bin.

And that's where your stackexchange discussion comes from, and why
everyone doesn't just write #!/usr/bin/python - I had used Python
for years before I ever saw it show up in /usr/bin.  Haiku is just
another example of that problem.

I fully agree that when writing scripts, one should ideally steer
clear of env when it isn't needed, for the reasons cited in that
discussion.  To do that, across platforms, you have to find out where
your interpreter is, and make your build/install procedures edit
it into the script.

I have to admit, though, that awk hangs me up on this one.  I use
it almost as much as the shell, and it is rather reliably in /usr/bin,
except on Haiku.  So it's trouble where I carry stuff around without
benefit of fancy install edit procedures.  (Which would probably use
sed ... let's see ... ah, /bin/sed, saved!)

        Donn

Other related posts: