.lib/bash/path.sh@09aadfdbc7dd
.lib/bash/path.sh
Sat, 03 Jul 2021 02:40:31 -0500
- author
- Meredith Howard <mhoward@roomag.org>
- date
- Sat, 03 Jul 2021 02:40:31 -0500
- changeset 918
- 09aadfdbc7dd
- parent 687
-
17d2d3c6042e
- permissions
- -rw-r--r--
fsck sucks without these. i'm so tired. git please
path-append() {
if [ -d "$1" ] && [[ ":$PATH:" != *":$1:"* ]]; then
PATH="${PATH:+"$PATH:"}$1"
return 0
fi
return 1
}
path-prepend() {
if [ -d "$1" ] && [[ ":$PATH:" != *":$1:"* ]]; then
PATH="$1${PATH:+":$PATH"}"
return 0
fi
return 1
}