From 65e1b523c7dbb9d36e01aeafc0ab76df847cc6fe Mon Sep 17 00:00:00 2001 From: Ryan Kavanagh Date: Tue, 21 May 2024 11:18:57 -0400 Subject: Update environment variable export script --- dot_config/sh/01_environment.d | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'dot_config') diff --git a/dot_config/sh/01_environment.d b/dot_config/sh/01_environment.d index eea2917..b84226f 100644 --- a/dot_config/sh/01_environment.d +++ b/dot_config/sh/01_environment.d @@ -1,8 +1,8 @@ #!/bin/sh -for f in ${HOME}/.config/environment.d/*; do - . $f - for VAR in $(sed -n '/^[^#]/ s/=.*//p' $f); do - export $VAR +for f in "${HOME}/.config/environment.d/"*; do + . "$f" + sed -n '/^[^#]/ s/=.*//p' "$f" | while read -r VAR; do + export "${VAR?}" done done -- cgit v1.2.3