diff options
-rw-r--r-- | .config/common_service.sh | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/.config/common_service.sh b/.config/common_service.sh index 50c34ee..d1322cf 100644 --- a/.config/common_service.sh +++ b/.config/common_service.sh @@ -1,12 +1,26 @@ #!/usr/bin/env sh : ${TURNSTILE_ENV_DIR:="${HOME}/.config/service-env"} -. /etc/profile +if [ ! -d "${TURNSTILE_ENV_DIR}" ] +then + mkdir -p "${TURNSTILE_ENV_DIR}" +fi -for file in /etc/profile.d/*.sh -do - . "$file" -done +if [ -f "/etc/profile" ] +then + . "/etc/profile" +fi -. "$HOME/.profile" +if [ -d "/etc/profile.d/" ] +then + for file in /etc/profile.d/*.sh + do + . "$file" + done +fi + +if [ -f "$HOME/.profile" ] +then + . "$HOME/.profile" +fi |