all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Alternatives to --emulate-fhs on foreign distros
@ 2023-04-19  6:18 Kyle Andrews
  2023-04-19  8:08 ` Andreas Enge
                   ` (3 more replies)
  0 siblings, 4 replies; 17+ messages in thread
From: Kyle Andrews @ 2023-04-19  6:18 UTC (permalink / raw)
  To: help-guix


Dear Guix,

The (many) shell scripts in my software depend on bashisms. In the code right now I typically use /usr/bin/env bash since I had read that was the most portable way of referencing a shell. However, I really don't think I have a good handle on what my choices are. Maybe the tedious solution of just typing `bash script.sh' in all of the system calls referencing this scripts might be the right approach in the long run?

Should I be aiming to automatically patch my source code to point to a specific bash? Why doesn't this happen automatically? Is there a way to upgrade from /bin/sh to bash within a shell script? I know I can use --emulate-fhs to ensure that /bin/bash and /usr/bin/env bash are available, but that seems to preclude including the software directly in Guix without a container.

I'm curious what other options might be. The main bashism I use is default environment variables ${FOO:-bar}. On a native Guix system I could just add /usr/bin/env back in. However, that doesn't seem to be possible with only Guix shell. Maybe I am wrong here?

Thanks,
Kyle


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2023-05-21  4:33 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-19  6:18 Alternatives to --emulate-fhs on foreign distros Kyle Andrews
2023-04-19  8:08 ` Andreas Enge
2023-04-19 13:05   ` Martin Castillo
2023-04-19 15:10 ` (
2023-04-19 15:18   ` (
2023-04-19 17:24   ` Kyle
2023-04-19 18:30     ` (
2023-04-20 22:32       ` Kyle Andrews
2023-04-21  5:36         ` (
2023-04-21 18:35           ` Kyle
2023-04-21 18:57             ` Kyle
2023-05-21  4:32             ` Philip McGrath
2023-04-20 12:56 ` Maxim Cournoyer
2023-04-21 15:44   ` Kyle
2023-04-22 20:36     ` Maxim Cournoyer
2023-04-27  2:16       ` Kyle
2023-04-20 19:51 ` wolf

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.