From 4e07c6f545c1a3a3ad050acd35f7cdbcc9dcf92b Mon Sep 17 00:00:00 2001 From: "Antonio J. Delgado" Date: Sun, 10 Sep 2023 12:49:01 +0300 Subject: [PATCH] change to script dir --- etc_bash_rc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/etc_bash_rc b/etc_bash_rc index fed928f..f21d4e3 100644 --- a/etc_bash_rc +++ b/etc_bash_rc @@ -1,6 +1,7 @@ #!/bin/bash +script_dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) # Load other bashrc files -for bashrc_file in $(find /etc/bashrc.d -type f | sort | grep -v ~$) +for bashrc_file in $(find "${script_dir}/bashrc.d" -type f | sort | grep -v ~$) do if [ -n "${bashrc_file}" ]; then # shellcheck disable=SC1090