From f95e87704759f31fe34016d436635bfb14c109a7 Mon Sep 17 00:00:00 2001 From: Christian Heller <c.heller@plomlompom.de> Date: Fri, 21 Mar 2025 19:09:10 +0100 Subject: [PATCH] Improve. --- testing/home/all/.nonpath_bins/plomlib.sh | 7 +++++++ testing/home/all/.profile | 8 +++----- .../.nonpath_bins/{plomlib.sh => plomlib.sh.desktop} | 0 3 files changed, 10 insertions(+), 5 deletions(-) create mode 100644 testing/home/all/.nonpath_bins/plomlib.sh rename testing/home/desktop/.nonpath_bins/{plomlib.sh => plomlib.sh.desktop} (100%) diff --git a/testing/home/all/.nonpath_bins/plomlib.sh b/testing/home/all/.nonpath_bins/plomlib.sh new file mode 100644 index 0000000..61907b2 --- /dev/null +++ b/testing/home/all/.nonpath_bins/plomlib.sh @@ -0,0 +1,7 @@ +dot_shell_file_variants () { + for FILE in ${1}\.*; do + if [ -f "${FILE}" ]; then + . "${FILE}" + fi + done +} diff --git a/testing/home/all/.profile b/testing/home/all/.profile index 3e0f3bd..1039ec7 100644 --- a/testing/home/all/.profile +++ b/testing/home/all/.profile @@ -7,6 +7,8 @@ # useful for providing environment variables to non-shell applications started # within a login session. +. "${HOME}"/.nonpath_bins/plomlib.sh + eval $(ssh-agent) && ssh-add PATH_BASHRC="${HOME}/.bashrc" @@ -19,8 +21,4 @@ PATH_LOCAL_BIN="${HOME}/.local/bin" export PATH # include others -for FILE in ${HOME}/\.profile\.*; do - if [ -f "${FILE}" ]; then - . "${FILE}" - fi -done +dot_shell_file_variants "${HOME}/\.profile" diff --git a/testing/home/desktop/.nonpath_bins/plomlib.sh b/testing/home/desktop/.nonpath_bins/plomlib.sh.desktop similarity index 100% rename from testing/home/desktop/.nonpath_bins/plomlib.sh rename to testing/home/desktop/.nonpath_bins/plomlib.sh.desktop -- 2.30.2