[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Alternatives to --emulate-fhs on foreign distros
From: |
Kyle Andrews |
Subject: |
Alternatives to --emulate-fhs on foreign distros |
Date: |
Wed, 19 Apr 2023 06:18:33 +0000 |
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
- Alternatives to --emulate-fhs on foreign distros,
Kyle Andrews <=
- Re: Alternatives to --emulate-fhs on foreign distros, Andreas Enge, 2023/04/19
- Re: Alternatives to --emulate-fhs on foreign distros, (, 2023/04/19
- Re: Alternatives to --emulate-fhs on foreign distros, (, 2023/04/19
- Re: Alternatives to --emulate-fhs on foreign distros, Kyle, 2023/04/19
- Re: Alternatives to --emulate-fhs on foreign distros, (, 2023/04/19
- Re: Alternatives to --emulate-fhs on foreign distros, Kyle Andrews, 2023/04/20
- Re: Alternatives to --emulate-fhs on foreign distros, (, 2023/04/21
- Re: Alternatives to --emulate-fhs on foreign distros, Kyle, 2023/04/21
- Re: Alternatives to --emulate-fhs on foreign distros, Kyle, 2023/04/21