aboutsummaryrefslogtreecommitdiff
path: root/dot_config/sh/01_environment.d
diff options
context:
space:
mode:
authorRyan Kavanagh <rak@rak.ac>2024-01-05 15:13:55 -0500
committerRyan Kavanagh <rak@rak.ac>2024-01-05 15:30:51 -0500
commit0dc520ec4367e73849b667ab2efde950c87d18bf (patch)
treeddd533dde5f4c4387d7c66fa4815f11abc75ecdc /dot_config/sh/01_environment.d
parentrak-meta (diff)
Improve environment var handling for shells and systemd
Diffstat (limited to 'dot_config/sh/01_environment.d')
-rw-r--r--dot_config/sh/01_environment.d8
1 files changed, 8 insertions, 0 deletions
diff --git a/dot_config/sh/01_environment.d b/dot_config/sh/01_environment.d
new file mode 100644
index 0000000..eea2917
--- /dev/null
+++ b/dot_config/sh/01_environment.d
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+for f in ${HOME}/.config/environment.d/*; do
+ . $f
+ for VAR in $(sed -n '/^[^#]/ s/=.*//p' $f); do
+ export $VAR
+ done
+done