diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2016-06-19 15:08:27 +0200 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2016-06-19 15:16:01 +0200 |
commit | ec6860cf411206d4a056250f73544c10970a9dc0 (patch) | |
tree | 44b18beae699386a0355072816e9e2b58244fc3a | |
parent | c58fe70fa1de0015f8cf824a2eab53a7715b28b1 (diff) |
Ensure RC variable passthrough
-rwxr-xr-x | nix-script | 2 | ||||
-rwxr-xr-x | nix-script-channel-update.sh | 1 | ||||
-rwxr-xr-x | nix-script-channel.sh | 4 |
3 files changed, 5 insertions, 2 deletions
@@ -146,4 +146,4 @@ SCRIPT_ARGS=$(shift_n $SHIFT_ARGS $*) # execute the script with its arguments # stdout "Calling: '$SCRIPT $SCRIPT_ARGS'" -RC_CONFIG=$RC_CONFIG RC_NIXPKGS=$RC_NIXPKGS exec bash $SCRIPT $SCRIPT_ARGS +RC=$RC RC_CONFIG=$RC_CONFIG RC_NIXPKGS=$RC_NIXPKGS exec bash $SCRIPT $SCRIPT_ARGS diff --git a/nix-script-channel-update.sh b/nix-script-channel-update.sh index ca4ef93..4ad8720 100755 --- a/nix-script-channel-update.sh +++ b/nix-script-channel-update.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash source $(dirname ${BASH_SOURCE[0]})/nix-utils.sh +[[ -f "$RC" ]] && { dbg "Config file found. Sourcing: '$RC'"; source $RC; } usage() { cat <<EOS diff --git a/nix-script-channel.sh b/nix-script-channel.sh index 6a24eca..d0880ba 100755 --- a/nix-script-channel.sh +++ b/nix-script-channel.sh @@ -51,5 +51,7 @@ stdout "SCRIPT = $SCRIPT" stdout "Parsing args for '$1'" SCRIPT_ARGS=$(echo $* | sed -r "s/(.*)$1(.*)/\2/") +[[ -f "$RC" ]] && { dbg "Config file found. Sourcing: '$RC'"; source $RC; } + stdout "Calling: '$SCRIPT $SCRIPT_ARGS'" -RC_CONFIG=$RC_CONFIG RC_NIXPKGS=$RC_NIXPKGS exec bash $SCRIPT $SCRIPT_ARGS +RC=$RC RC_CONFIG=$RC_CONFIG RC_NIXPKGS=$RC_NIXPKGS exec bash $SCRIPT $SCRIPT_ARGS |