aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Kavanagh <rak@rak.ac>2024-05-21 11:18:57 -0400
committerRyan Kavanagh <rak@rak.ac>2024-05-21 11:18:57 -0400
commit65e1b523c7dbb9d36e01aeafc0ab76df847cc6fe (patch)
tree3820a2a27274669493a37e68c53df29fc8d3d012
parentproperly escape vars in neomutt config (diff)
Update environment variable export script
-rw-r--r--dot_config/sh/01_environment.d8
1 files changed, 4 insertions, 4 deletions
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