diff options
Diffstat (limited to '.local/bin/systemd-import-profile')
-rwxr-xr-x | .local/bin/systemd-import-profile | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/.local/bin/systemd-import-profile b/.local/bin/systemd-import-profile new file mode 100755 index 0000000..c896e31 --- /dev/null +++ b/.local/bin/systemd-import-profile @@ -0,0 +1,9 @@ +#!/bin/sh +. ~/.profile +vars=$(declare -x -p | sed -rn 's/^declare -x ([^=]+)(=.*)?$/\1/p' | grep -xFv -e PWD -e OLDPWD -e SHLVL) +if test "$1" = '-p'; then + declare -p $vars + echo systemctl --user import-environment $vars +else + systemctl --user import-environment $vars +fi |