From 7f1cdabda9b01e4cec8e51dbe506e11a863c542e Mon Sep 17 00:00:00 2001 From: Emery Hemingway Date: Sun, 13 Oct 2019 15:35:47 +0200 Subject: [PATCH] Write a Tup config when entering nix-shell --- upstream/default.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/upstream/default.nix b/upstream/default.nix index a18f5b0..8feff0a 100644 --- a/upstream/default.nix +++ b/upstream/default.nix @@ -125,8 +125,12 @@ let export PROMPT_DIRTRIM=2 export PS1="\[\033[1;30m\]Genode-dev [\[\033[1;37m\]\w\[\033[1;30m\]] $\[\033[0m\] " export PS2="\[\033[1;30m\]>\[\033[0m\] " - echo $tupConfig | tr ' CONFIG_' '\nCONFIG_' > tup.config - echo "A new tup.config file has been generated." + if [ -e "configs/.gitignore" ]; then + local CFG_PATH=configs/${targetPlatform.config}.config + echo $tupConfig | tr ' CONFIG_' '\nCONFIG_' > $CFG_PATH + echo "Tup configuration placed at $CFG_PATH, to activate run the following command:" + echo " tup variant $CFG_PATH" + fi ''; };