mirror of
https://github.com/notwa/rc
synced 2024-06-28 18:17:11 -07:00
warn about nonexistent paths
This commit is contained in:
parent
769dba39a8
commit
f0b95f54a7
|
@ -16,6 +16,7 @@ hash -d py=~win"/Dropbox/py"
|
||||||
|
|
||||||
ADDPATH() {
|
ADDPATH() {
|
||||||
new="$(readlink -f "$1")"
|
new="$(readlink -f "$1")"
|
||||||
|
[ -d "$new" ] || echo -E "ADDPATH: path doesn't exist: $new" >&2
|
||||||
grep ":$new:" <<<":$PATH:" >/dev/null || export PATH="$PATH:$new"
|
grep ":$new:" <<<":$PATH:" >/dev/null || export PATH="$PATH:$new"
|
||||||
}
|
}
|
||||||
ADDPATH "$HOME/opt/local/bin"
|
ADDPATH "$HOME/opt/local/bin"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user