[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: guix environment shebang interpreter
From: |
EuAndreh |
Subject: |
Re: guix environment shebang interpreter |
Date: |
Thu, 13 Feb 2020 12:43:45 -0300 |
address@hidden writes:
> But, one answer there has a possible solution for you:
> https://unix.stackexchange.com/a/399698
>
> --8<-------------------------------------------------------
> #!/bin/sh -
>
> if [ "$1" != "--really" ]; then exec bash --posix -- "$0" --really "$@";
> fi
>
> shift
>
> # Processing continues
> ----------------------------------------------->8-----------
>
> It lets the script `exec` itself with the right arguments! So maybe put
>
> exec guix environment --ad-hoc PKG1 PKG2 ... -- INTERPRETER "$0"
> "$@"
>
> there?
Hmm, I guess that works. It's a bit ugly but does the job. Thanks for
the link.
I also just wanted to check for the existance of such functionality in
Guix already, before pursuing alternatives.
Thanks Moritz :)