2020-07-03 22:31:51 +00:00
|
|
|
#!/bin/bash
|
|
|
|
# Should not be executable, only sourced by other scripts
|
|
|
|
|
|
|
|
command_exists() { command -v ${1} >/dev/null; }
|
2020-11-23 05:35:09 +00:00
|
|
|
source_if_exists() { [ -f "$1" ] && source $1; }
|
2021-07-01 15:35:06 +00:00
|
|
|
|
|
|
|
append_path () {
|
|
|
|
case ":$PATH:" in
|
|
|
|
*:"$1":*)
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
PATH="${PATH:+$PATH:}$1"
|
|
|
|
esac
|
|
|
|
}
|