Opravy z macos

This commit is contained in:
lachtan obecny
2026-07-13 06:06:18 +02:00
parent a2441cf23b
commit b3026487f0
5 changed files with 34 additions and 16 deletions

View File

@@ -60,6 +60,12 @@ function append_path() {
fi
}
function append_path_to_end() {
local path="$1"
remove_path "$path"
append_path "$path"
}
function append_path_try() {
if [[ -e "$1" ]]; then
append_path "$1"
@@ -79,7 +85,14 @@ function prepend_path_try() {
}
function remove_path() {
PATH=$(path | grep -v "$1" | tr "\n" ":")
PATH=$(path | grep -v "^$1$" | tr "\n" ":")
}
function set_system_paths() {
append_path_to_end /usr/bin
append_path_to_end /bin
append_path_to_end /usr/sbin
append_path_to_end /sbin
}
function uniq_path() {