From 3eb81b944565ce4aee1a432c1a58514f5126ae0b Mon Sep 17 00:00:00 2001 From: crater2150 Date: Thu, 1 Jun 2023 12:08:31 +0200 Subject: [PATCH] lib: add import-env --- lib/common.zsh | 7 +++++++ misc/cronhelp | 6 ++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/lib/common.zsh b/lib/common.zsh index f68bc5f..2139a7b 100644 --- a/lib/common.zsh +++ b/lib/common.zsh @@ -64,3 +64,10 @@ pip-venv-deps() { exit 1 fi } + +import-env() { + SOURCE_PROCESS=$1 + SOURCE_PID=$(pgrep $SOURCE_PROCESS | head -n 1) + SOURCE_ENV=("${(@ps:\000:)$(