diff options
author | Paul Colomiets <paul@colomiets.name> | 2014-07-12 16:32:28 +0300 |
---|---|---|
committer | Bjørn Forsman <bjorn.forsman@gmail.com> | 2014-07-16 23:09:49 +0200 |
commit | f12633c628c9f148762533ccd2084a01e540c4d5 (patch) | |
tree | 392e3016a549c961010e2433df308bced0707bc1 /pkgs/misc/my-env | |
parent | f9a24ba487a32dda95a4eec69ca0784c76b75a1c (diff) |
my-env: Support for running command directly by load-env-xxx script
First I don't think there is a reason to run shell as a child of
load-env-xxx script and not to just exec into it.
Also it's often useful to just run a command inside the environment
load-env-xxx command --args
Closes #3254
Diffstat (limited to 'pkgs/misc/my-env')
-rw-r--r-- | pkgs/misc/my-env/loadenv.sh | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/pkgs/misc/my-env/loadenv.sh b/pkgs/misc/my-env/loadenv.sh index a162f8b853ac..1aab4ac0208f 100644 --- a/pkgs/misc/my-env/loadenv.sh +++ b/pkgs/misc/my-env/loadenv.sh @@ -11,5 +11,9 @@ export buildInputs export NIX_STRIP_DEBUG=0 export TZ="$OLDTZ" -@shell@ +if test $# -gt 0; then + exec "$@" +else + exec @shell@ +fi |