From 0c0a7f81ec4623370577f48669b26792734cf698 Mon Sep 17 00:00:00 2001 From: Jonathan Hodgson Date: Tue, 16 Nov 2021 11:21:21 +0000 Subject: [PATCH] Sets repdef environment variable in projects --- shells/zsh/STOW/.zshrc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/shells/zsh/STOW/.zshrc b/shells/zsh/STOW/.zshrc index be87ce2f..8a2d0ed8 100644 --- a/shells/zsh/STOW/.zshrc +++ b/shells/zsh/STOW/.zshrc @@ -70,6 +70,9 @@ else if [ -n "$current" ]; then local script="/usr/bin/script" if [[ ! "$(ps -ocommand -p $PPID | grep -v 'COMMAND' | cut -d' ' -f1 )" == "$script" ]]; then + if [ -f "$current/index.yaml" ]; then + export repdef="$(realpath "$current/$(yq -r .repdef "$current/index.yaml")")" + fi mkdir "$current/shell-logs" 2> /dev/null /usr/bin/script -f "$current/shell-logs/$(date +"%d-%b-%y_%H-%M-%S")_shell.log" fi