This commit is contained in:
parent
7e5d880156
commit
d93f63cf82
40 changed files with 448 additions and 649 deletions
|
|
@ -1,15 +1,14 @@
|
|||
[ -z "$1" ] && {
|
||||
echo "Missing path parameter!" >&2
|
||||
echo 'Missing path parameter!' >&2
|
||||
return 1
|
||||
}
|
||||
|
||||
full_path="$(readlink -e "$1")"
|
||||
|
||||
[ ! -d "$full_path" ] && {
|
||||
[ -d "$full_path" ] || {
|
||||
echo "Path doesn't exist!" >&2
|
||||
return 1
|
||||
}
|
||||
|
||||
export PATH="$full_path:$PATH"
|
||||
[[ ":$PATH:" == *":${full_path}:"* ]] || export PATH="$full_path:$PATH"
|
||||
|
||||
# vim: ft=sh
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue