Skip to content

Commit

Permalink
Updated default .profile for all users
Browse files Browse the repository at this point in the history
  • Loading branch information
UrsaDK committed Aug 29, 2023
1 parent 004b278 commit 1e99f86
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions apkovl/etc/skel/.profile
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,18 @@ export EDITOR="$(type -P nvim || type -P vi)"
umask 022

# Load XDG config files: ~/.config/[SHELL-NAME]/*.sh
# Load local configuration files
source_config_dir() {
_shell="$(basename "$(echo "${0:-sh}" | tr -d '-')")"
source_configs_for_available_tools() {
if [ -d "${1}" ]; then
for rc in "${1}"/*.sh; do
if type -t "$(basename "${rc}" '.sh')" > /dev/null; then
. ${rc}
fi
done
unset rc
else
echo "WARNING: Missing directory -- ${1}" >&2
fi
}
_shell="$(basename "$(echo "${0:-sh}" | tr -d '-')")"
source_config_dir "${XDG_CONFIG_HOME}/${_shell}"
unset _shell
source_configs_for_available_tools "${XDG_CONFIG_HOME}/${_shell}"
unset _shell source_configs_for_available_tools

0 comments on commit 1e99f86

Please sign in to comment.