dotfiles/.local/bin/source/src_add_path
2024-11-28 22:19:16 +03:00

15 lines
228 B
Bash

[ -z "$1" ] && {
echo "Missing path parameter!" >&2
return 1
}
full_path="$(readlink -e "$1")"
[ ! -d "$full_path" ] && {
echo "Path doesn't exist!" >&2
return 1
}
export PATH="$full_path:$PATH"
# vim: ft=sh