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.