forked from Job79/devcontainer
refactor: use build in bash functions to get script path
This commit is contained in:
4
devc.sh
4
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.
|
||||
|
||||
Reference in New Issue
Block a user