summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2016-06-19 15:08:27 +0200
committerMatthias Beyer <mail@beyermatthias.de>2016-06-19 15:16:01 +0200
commitec6860cf411206d4a056250f73544c10970a9dc0 (patch)
tree44b18beae699386a0355072816e9e2b58244fc3a
parentc58fe70fa1de0015f8cf824a2eab53a7715b28b1 (diff)
Ensure RC variable passthrough
-rwxr-xr-xnix-script2
-rwxr-xr-xnix-script-channel-update.sh1
-rwxr-xr-xnix-script-channel.sh4
3 files changed, 5 insertions, 2 deletions
diff --git a/nix-script b/nix-script
index 5bdfe15..5ff5fb4 100755
--- a/nix-script
+++ b/nix-script
@@ -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