dotfiles/dot_common.sh
2021-07-01 10:35:24 -05:00

14 lines
301 B
Bash

#!/bin/bash
# Should not be executable, only sourced by other scripts
command_exists() { command -v ${1} >/dev/null; }
source_if_exists() { [ -f "$1" ] && source $1; }
append_path () {
case ":$PATH:" in
*:"$1":*)
;;
*)
PATH="${PATH:+$PATH:}$1"
esac
}