Opravy z macos
This commit is contained in:
15
functions.sh
15
functions.sh
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user