Files
config-bash/libs.deprecated/path.bash
T
xavier 6968a93343 style: Normalize variable expansions in libs.deprecated/*
These files stay deprecated and out of the sourcing path for now, but
apply the same ${var} notation cleanup as the rest of the repo where
it's a pure notation fix. basedir.bash is left untouched: its bug is
a broken escape, not a notation issue, and it mirrors the one already
removed from _helpers.bash.
2026-08-22 00:55:59 +02:00

10 lines
228 B
Bash

#!/bin/bash
_path_add() {
if [ -d "$1" ] && [[ ":${PATH}:" != *":$1:"* ]]; then
PATH="${PATH:+"${PATH}:"}$1"
fi
}
# Source : https://superuser.com/questions/39751/add-directory-to-path-if-its-not-already-there