From d74f42b7fa3ecfde0cd0dc7f8ee89a68e9cfe1a3 Mon Sep 17 00:00:00 2001 From: Job79 Date: Sun, 15 Mar 2026 15:59:02 +0100 Subject: [PATCH] refactor: use build in bash functions to get script path --- devc.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/devc.sh b/devc.sh index 892ec35..d24157c 100755 --- a/devc.sh +++ b/devc.sh @@ -29,8 +29,8 @@ default_args() { [[ -e "${SSH_AUTH_SOCK:-}" ]] && run_opts+=("-v" "$SSH_AUTH_SOCK:/run/user/1000/ssh-auth-sock") # Load custom container config. - local config_file="$(dirname "$(realpath "$0")")/containers/$name/config.sh" - [[ -f "$config_file" ]] && source "${config_file}" + local config_file="${BASH_SOURCE[0]%/*}/containers/$name/config.sh" + [[ -f "$config_file" ]] && source "$config_file" } # param_args parses CLI arguments into podman run options.