From a4697a41fa6fc644405395a113b4bbf5d7cfef6f Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Tue, 9 May 2023 22:09:01 +0200 Subject: [PATCH] source bash relatively --- bash.bashrc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/bash.bashrc b/bash.bashrc index e90030d..8fa3fe2 100644 --- a/bash.bashrc +++ b/bash.bashrc @@ -1,3 +1,9 @@ -for file in /etc/bash.d/*.sh ; do +#! /usr/bin/env bash +PATH="$(realpath "${BASH_SOURCE[0]}")" +ROOT="$(dirname "${PATH}")" + +DIRECTORY="${ROOT}/bash.d" + +for file in "${DIRECTORY}"/*.sh ; do source "${file}" done